Skip to main content

collect_numbers.py

Download source

collect_numbers.py
items = []
while True:
    n = int(input("Enter a number: "))
    if n == 0:
        break
    items.append(n)