Skip to content

Commit aa7a962

Browse files
committed
examples for neutralboy :)
1 parent 20ba81b commit aa7a962

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

basics/loops.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,13 @@ while True:
381381
option = input("Choose an option: ")
382382

383383
# Things like option == 0 don't work because option is a string
384-
# and it needs to be compared with a string.
384+
# and it needs to be compared with a string:
385+
# >>> 0 == 0
386+
# True
387+
# >>> '0' == '0'
388+
# True
389+
# >>> 0 == '0'
390+
# False
385391
if option == '0':
386392
print("Bye!")
387393
break

0 commit comments

Comments
 (0)