Skip to content

Commit c5ad310

Browse files
committed
simpler emptiness check
we can't rely on the boolean value yet, it's introduced in a future chapter
1 parent 350c540 commit c5ad310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ while True:
384384
print("I didn't know you to begin with.")
385385

386386
elif option == '4':
387-
if len(namelist) == 0: # len is short for length
387+
if namelist == []:
388388
print("I don't know anybody yet.")
389389
else:
390390
for name in namelist:

0 commit comments

Comments
 (0)