What is the difference of this two list in python:
list1 = [1,2,3,4,5,6,7,8,9]
list2 = [[[[1,2,3,4,5,6,7,8,9]]]]
When I use type(list1) and type(list2), all come with list , but when I try to make some deal such as:
Using list1:
new_total=[]
for i in range(0,len(list1),3):
b=list1[i:i+3]
print(len(b))
output:
9
6
3
Using list2:
for i in range(0,len(list2),3):
b=list2[i:i+3]
print(len(b))
output:
1
3 3 3.