#
File Lists07.py
# Rev 2/4/00 # Copyright 2000, R. G. Baldwin # Illustrates more nested # elements # #------------------------------- print "Create and print a list\ with 3 nested elements" listA = [[2,4],[8,16,32], [64,128,256,512]] print listA print "Number of elements is:" print len(listA) print "Length of Element 0 is" print len(listA[0]) print "Length of Element 1 is" print len(listA[1]) print "Length of Element 2 is" print len(listA[2]) Figure 7 |