0
Then.... x=int(input("Enter number of players")) for i in range(x): players[i]=input() print (players)
why is this bringing an error
7 Réponses
+ 4
merely look at your code,its easy to decipher youre trying to iterate over an array/list you haven't even created
+ 2
x=int(input("Enter number of players"))
players=[]
for i in range(x):
players[i]=input()
print (players)
0
how
0
The players array does not exist according to your code
0
Just I want to get the number of players from user and store it in x var
Then I want to get players name as list
from the user
0
where did i made an error according to it
pls try elaborate
0
then after getting it from the user
then print it