0
Why does this code still print the zero (0)?
items = [] n = 0 while True: n = int(input()) items.append(n) if(n == 0): break print(items)
2 Answers
+ 8
This is because you are checking the value of "n" after inserting it into the list.
+ 1
Thank you!