0
there Python master, I have the following code:
veiculos = [['Fusca', 'Escort', 'BMW'],['1600W', 'XR3', '325i']]
print(veiculos)
print(veiculos[0][0],veiculos[1][0])
print(veiculos[0][1],veiculos[1][1])
print(veiculos[0][2],veiculos[1][2])
for i in range(len(veiculos)):
for j in range(len(veiculos[i])):
print(veiculos[i][j], end=' - ')
print()
I would like to know how to make the user enter this data, ie using input, the user type the vehicle name, then type the vehicle model, using multidimensional list. I am waiting for a help, who is seeking to learn, very grateful.
And it needs to be on two separate lists?
– Woss
I would suggest you take a step back, and study "dictionaries" in Python - even if you don’t use dictionaries, the best thing there is to group the data that goes together, using "list lists" instead of having the data diferents of the same entry in separate lists -
– jsbueno