{ "metadata": { "name": "", "signature": "sha256:7f2d14f2c2ae43d8abc01634eb7d39800f8596aa61628d10404d3502e1e30c64" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 20 : Dynamic Memory Allocation" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example: 1, Page No. 5.146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Reallocation of memory\n", "\n", "p= \"MADRAS\"\n", "\n", "print \"Memory contains: %s\\n\"%(p) #There is no reallocation memory in python\n", "\n", "p=\"CHENNAI\"\n", "\n", "print \"Memory now contains: %s\\n\"%(p)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Memory contains: MADRAS\n", "\n", "Memory now contains: CHENNAI\n", "\n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }