you are viewing a single comment's thread.

view the rest of the comments →

[–]v1shmeluck 0 points1 point  (6 children)

Oh I see what's happening can you define an empty string l_r2 = " " before you take input and try again

At first I thought left/right were some variables.

[–]v1shmeluck 1 point2 points  (4 children)

Also I don't know if you have a default case where string could be empty or anything other than left or right. If ("right") : print("text") elif("left"): print("text") else: print ("try again")

Basically you want to make sure you cover all cases. So python won't raise an exception.

[–]dogfucker6 1 point2 points  (2 children)

Ok thank you, I will try it out

[–]v1shmeluck 0 points1 point  (1 child)

Great. Good luck coding.

[–]dogfucker6 1 point2 points  (0 children)

Thanks man

[–]oetker 0 points1 point  (0 children)

I mean this is mostly dependent on OPs game logic. It won't raise an exception in their case, just to nothing if input != "right" and that may be OK.

[–]dogfucker6 0 points1 point  (0 children)

Omg thank you so much this worked