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 ?

11th May 2022, 4:40 AM
SilentHealer584
SilentHealer584 - avatar
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]]
11th May 2022, 10:41 AM
Lothar
Lothar - avatar