Reputation: 37
I want to make a program that could make you input the number of times you want to input something, then ask you for your input. After the amount of times it is over, it prints all of your inputs. I don't know how to word it correctly, but here is an example.
input: 2 hello 1 hello 2 output: hello 1 hello 2
The first line of input says the number of times I will later input, which is 2 in this case, so I will have to input 2 things before I get the result. After ALL of the inputs are done, it prints my inputs. Can somebody help me on this? Sorry for the bad wording.
Upvotes: 0
Views: 63
Reputation: 132
Check with this
a = int (input(" No. of inputs: "))
c=[]
for x in range (0,a):
b = input(" Enter Input: ")
c.append(b)
print (c)
Upvotes: 1