if input equals string, do something… python 2.7

if input equals string, do something… python 2.7

Just define start_over…it will work

question = raw_input(Do you wish to try again? y/n: )
start_over = 10
if question == y:
    start_over -= 1
    print start_over
else:
    raise SystemExit

if input equals string, do something… python 2.7

Leave a Reply

Your email address will not be published. Required fields are marked *