I need to input an unknown number of rows (it can be a singular row once and then 432 of them the other time). I tried using the while loop which I think would be good for this type of program, but the only solution I can find is if I input an empty row after the ones with data and I need a program which doesn't contain that (since that is the way examples work)
a=[]
b=[]
l=[]
while True:
l = list(input().split())
if l[0] == ' ':
a.append(l[0])
b.append(int(l[1]))
else:
break
My inputs look like this:
T 20
This is the program that I tried to use, it has been published here a bunch of times;
I'm new to programming and trying to get into the world of it so I'm hoping for some help here :)