ticket = [0 for f in range(11)]
x=0
for i in range(10):
x = x+1
ticket[x] = int(input("INPUT-",x,":"))
i want to make the input look like "INPUT-1: ","INPUT-2:" following the x in the loop
Try this instead:
ticket = [0 for f in range(11)]
x=0
for i in range(10):
x = x+1
ticket[x] = int(input("INPUT-" + str(x) + ":"))
Alternatively, you can use an f-string
to format the output:
input(f'INPUT-{x}:')
Replace the comma ,
with a plus sign +
, but then you are gonna run into a problem which is that you cant concatenate str to int, so you have to cast it to string by str()
ticket[x] = int(input("INPUT-"+str(x)+":"))