#! /usr/bin/env python # -*- coding: utf-8 -*- """ Code from the chapter 3 on "Python in Easy Steps" book. Can be downloaded from http://ineasysteps.com/resource-centre/downloads/ (http://ineasysteps.com/wp-content/uploads/2013/07/src.zip) Credit: Lilian Besson for http://perso.crans.org/besson/cs101/solutions/easysteps/ License: GPLv3 """ # Page 44 print "# Writing lists" nums = [0, 1, 2, 3, 4, 5] quarter = ['January', 'February', 'March'] print "First month :", quarter[0] print "Second month :", quarter[1] print "Third month :", quarter[2] coords = [[1, 2, 3], [4, 5, 6]] print "\nTop Left 0,0", coords[0][0] print "\nBottom Right 0,0", coords[0][0] if __name__ == '__main__': from doctest import testmod testmod(verbose=False)