StopLoop.py

Download source

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