Chapter 20 : Dynamic Memory Allocation

Example: 1, Page No. 5.146

In [1]:
#Reallocation of memory

p= "MADRAS"

print "Memory contains: %s\n"%(p)            #There is no reallocation memory in python

p="CHENNAI"

print "Memory now contains: %s\n"%(p)
Memory contains: MADRAS

Memory now contains: CHENNAI