Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
293 B
2
Indexable
Never
dwarves = [None]*7
i = 0
                        
while True :
    try:
        dwarves[i]= input()
        if dwarves[i] == "0": break
        i += 1
    except IndexError:
        print("Sorry, you entered too many dwarves.")
        break
                        
print(dwarves)