[Solved] Python take a variable number of inputs? [closed]


amount = int(input("Enter the amount of numbers that you have: "))

numbers = []
for i in range(amount):
    new = input('Enter number {}: '.format(i+1))
    numbers.append(new)

print(numbers)

You should probably do some reading on loops in Python.

2

solved Python take a variable number of inputs? [closed]