0
    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

illjimae
  • 1
  • 1

3 Answers3

2

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) + ":"))
Abdulaziz0
  • 128
  • 5
2

Alternatively, you can use an f-string to format the output:

input(f'INPUT-{x}:')
Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268
1

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)+":"))
Hannon qaoud
  • 785
  • 2
  • 21