#
File Lists05.py
# Rev 2/4/00 # Copyright 2000, R. G. Baldwin # Illustrates replacing an # element with a slice # #------------------------------- print "Create and print a list" listA = [100,200,300,400,500] print listA print "Original length is:" print len(listA) print "Replace an element" listA[2] = [2,4,8,16,32,64] print "Print the modified list" print listA print "Modified length is:" print len(listA) Figure 3 |