I\'m writing a program in Python where I would like to do the following: I ask for a certain input by writing
x = int(input())
Now, given t
Assigning them to certain variables with an unknown amount of inputs is not something you want. What you can do is make a list with the inputs:
x = int(input()) # the amount of numbers
input_list = []
for i in range(x):
input_list.append(input())
print input_list
Now you can index the input_list to get the n-th input:
print input_list[0]
This will return the first input as the indexing in Python starts from 0