i put elif statement in while statement, , expected when finishes what's inside it, it'd repeat while command. happens console spams "unknown command" indefinitely. how fix this?
while o == 0: if bla bla bla o = 1 elif o != 1: #this should happen after takes if commands above me account print('unknown command')
whenever o==0 true, elif statement true (o!=1) unless if statement true , o changed 1. when elif statement executed, goes infiniteloop since value of o not changed inside elif. or add break after print in elif
Comments
Post a Comment