0
Is it possible to have a list of lists ? Example: x = [[a], [a,b], [a,b,c]]
I know it's possible with matrix arrays etc but is this fesable with just lists ?
1 Odpowiedź
+ 3
SilentHealer584 ,
we can use <list>.append(...) as shown in the code, or get input and append it, or read from a file and append it,...
players = []
players.append(['tom', 8, True])
players.append(['sue', 5, False])
print(players)
# result: [['tom', 8, True], ['sue', 5, False]]