# File Lists04.py
# Rev 2/4/00
# Copyright 2000, R. G. Baldwin
# Illustrates replacing 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 a slice"
listA[1:4] = [2,4,8,16,32,64]
print "Print the modified list"
print listA
print "Modified length is:"
print len(listA)
 

Figure 1