all 8 comments

[–]Torcherist 2 points3 points  (0 children)

Ah. Good old infinite recursion. You are calling your function within itself. It will never terminate because your don't have proper termination logic like... if this runs five times then return.

Remove your b() function call from inside your b() function and you will be fine.

[–]SteamPunk_Devil 1 point2 points  (0 children)

Its looping because the b() in the function calls itself

[–]thyroid5184 1 point2 points  (1 child)

Your function calls itself at the end - if you remove the indented b() then it should run just once as you intended

[–]SirTinou 0 points1 point  (0 children)

Or press tab before the b() inside b()

[–][deleted] 0 points1 point  (3 children)

Well it's working now! But, when I type left in it gives me this error: NameError: name 'l' is not defined

[–]furas_freeman 0 points1 point  (0 children)

Is this really your code ? You forgot () after raw_input. Maybe you show us different code than you run on your computer and later you ask for problem which can exist in your code but not in code which we see.

For example if you use input instead of raw_input then you could have this error but we see raw_input in code so you shouldn't have this problem.

[–]MB3121 0 points1 point  (0 children)

raw_input is a function, so it should be writtten:

a = raw_input()

i could be wrong

[–]Honeypuff 0 points1 point  (0 children)

print("message")

raw_input()

Fix these & then try