0

Lists inside lists

Why is it: print([2][2]) instead of: print([2[2]]) ?

1st Dec 2016, 8:01 AM
Kai B.
Kai B. - avatar
1 Respuesta
0
If you want to print list inside of list. Then use correct syntax. Your code is with wrong syntax. put comma between two list like print([2,[2]]) and in first code, you print two list without separation. Here also you have to use comma like print([2],[2])
1st Dec 2016, 8:30 AM
Aditya kumar pandey
Aditya kumar pandey - avatar