Nest lists (create lists containing other lists) : Nested List : List PYTHON examples


PYTHON examples » List » Nested List »

 

Nest lists (create lists containing other lists)


Nest lists (create lists containing other lists)


q = [23]
p = [1, q, 4]

print len(p)

print p[1]

print p[1][0]

p[1].append('xtra')

print p

print q

#p[1and q really refer to the same object! 

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo List
» Nested List