, n OUT
n Community nCollege
Bostonn n Franciscon
Londonn Toronton SydneynTokyon Singaporen Madridn Mexi
conCityn Munichn Paris HongnKongn Montreal
, ExecutivenEditornEdi MichaelnHirschnStepha
torialnAssistant nienSellingernJeffreynH
AssociatenManagingn olcombn JoycenCosenti
n TextnDesigner nonWellsnBethnPaquin
CovernDesignernPhot BethnAndersonn
on Research MariannenGrothn
DigitalnAssetsnManagernS BethanynTiddnEri
eniornMedianProducernMa nnDavis
rketingnManagernSeniorn
Authorn Joen
TechnologynSpecialist n CarolnMelville
nSeniornManufacturingnBuyern nGinnyn Michau
SeniornMedian BuyernProducti d
onnCoordinationnCompositionn ShelleynCreager,nAptaranCorp.
andnIllustrationsnIndexing nAptaranCorp.
StevenRath
Photon Credits
Covernimagen n Imagesn n ImagenSourcenPink
Figuren1-
3,n "Then ENIACncomputer,"n (pagen4)nisncourtesyn ofn U.S.n ArmynHistoricn Computern Images.nFiguren1-
4,n "Anlabntechniciannholdsnan modernnmicroprocessor,"n(pagen4)nisncourtesyn ofn IntelnCorporation.nFiguren1-
5,n "Memorynchips,"n (pagen5)nisncourtesynofn IBMnCorporation.
Renderedn artn andn photographicn imagesn inn Figuresn1-2n (pagen3),n1-15n (pagen n 1-16n andn 1-17n (pagen
andn 1-19nandn 1-20n (pagen19)n n 2007n n andn itsnlicensors.n AllnRightsn Reserved.
Manynofn thendesignationsnusednbynmanufacturersnandnsellersntondistinguishntheirnproductsnarenclaimednasntrade-
nmarks.nWherenthosendesignationsnappearninnthisnbook,nandnAddison-
Wesleynwasnawarenofnantrademarknclaim,nthendesignationsnhavenbeennprintedninninitialncapsnornallncaps.
LibrarynofnCongressnCataloging-in-
PublicationnDatanGaddis,nTony.
Startingn outn withn Pythonn nTonyn Gaddis.
p.n cm.
Includesnindex.
ISBN-13:n 978-0-321-53711-9
ISBN-10:n 0-321-53711-4
1. Pythonn (Computern programn language)n I.n Title.
Copyrightn n2009n
nEducation,nInc.nAllnrightsnreserved.nNonpartnofnthisnpublicationnmaynbenreproduced,nstoredninnanretrievalnsystem,no
rntransmitted,ninnanynformnornbynanynmeans,nelectronic,nmechanical,nphotocopying,nrecording,nornotherwise,nwitho
utnthenpriornwrittennpermissionnofnthenpublisher.nPrintedninnthenUnitednStatesnofnAmerica.nForninformationnonnob
tainingnpermissionnfornusenofnmaterialninnthisnwork,npleasensubmitnanwrittennrequestnton
nEducation,nInc.,n RightsnandnContractsnDepartment,n 501nBoylstonnStreet,nSuiten900,nBoston,nMAn02116,nfaxn (61
7)n671-3447,nornonlinenatnhttp://www.pearsoned.com/legal/permissions.htm.