Skip to content

Commit

Permalink
examples for neutralboy :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed May 26, 2017
1 parent 20ba81b commit aa7a962
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion basics/loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,13 @@ while True:
option = input("Choose an option: ")

# Things like option == 0 don't work because option is a string
# and it needs to be compared with a string.
# and it needs to be compared with a string:
# >>> 0 == 0
# True
# >>> '0' == '0'
# True
# >>> 0 == '0'
# False
if option == '0':
print("Bye!")
break
Expand Down

0 comments on commit aa7a962

Please sign in to comment.