{ "metadata": { "name": "", "signature": "sha256:609a5d3522e4231d9e4a78cca1d62620ebc8f02a9a5a670cc7f12a71d13447b3" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2 - Memory & Data Types" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 2.1, page no. 54" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "import sys \n", "\n", "print \"Size of Integer is: \" + str(sys.getsizeof(int()))\n", "print \"Size of Float is: \" + str(sys.getsizeof(float()))\n", "print \"Size of Long is: \" + str(sys.getsizeof(long()))\n", "print \"Size of String is: \" + str(sys.getsizeof(str()))" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Size of Integer is: 24\n", "Size of Float is: 24\n", "Size of Long is: 24\n", "Size of String is: 37\n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }