+ 2
What can do if I want to print the no.0 element of every equal named list ?
3 odpowiedzi
+ 1
You can't have 2 variables with the same name.
+ 1
But maybe you can use list:
l = []
and append:
l.append(["p", "r"])
l.append(["i", "o"])
print(l)
#Output: [['p', 'r'], ['i', 'o']]
+ 1
l = ["p","r"]
l += ["i","o"]
print(l)