A Byte of

download A Byte of

of 165

  • date post

    18-Nov-2015
  • Category

    Documents

  • view

    19
  • download

    0

Embed Size (px)

description

A Byte of Python.pdf

Transcript of A Byte of

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 1/165

    AByteofPython

    SwaroopCHswaroop@swaroopch.com

    mailto:swaroop@swaroopch.com

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 2/165

    TableofContents

    1.Welcome2.Dedication3.Preface4.Introduction5.Installation6.FirstSteps7.Basics8.OperatorsandExpressions9.ControlFlow10.Functions11.Modules12.DataStructures13.ProblemSolving14.ObjectOrientedProgramming15.InputandOutput16.Exceptions17.StandardLibrary18.More19.Appendix:FLOSS20.Appendix:Colophon21.Appendix:HistoryLesson22.Appendix:RevisionHistory23.Translations24.TranslationHowto

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 3/165

    "AByteofPython"isafreebookonprogrammingusingthePythonlanguage.ItservesasatutorialorguidetothePythonlanguageforabeginneraudience.Ifallyouknowaboutcomputersishowtosavetextfiles,thenthisisthebookforyou.

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 4/165

    1.Welcome

    1.1.WhoreadsAByteofPython?Herearewhatpeoplearesayingaboutthebook:

    ThisisthebestbeginnerstutorialIveeverseen!Thankyouforyoureffort.

    WaltMichalik

    Thebestthingifoundwas"AByteofPython",whichissimplyabrilliantbookfor

    a beginner. Its well written, the concepts are well explained with self evident

    examples.

    JoshuaRobin

    Excellentgentleintroductiontoprogramming#Pythonforbeginners

    ShanRajasekaran (https://twitter.com/ShanRajasekaran/status/268910645842423809)

    Bestnewbieguidetopython

    NicksonKaigi (https://twitter.com/nickaigi/status/175508815729541120)

    starttolovepythonwitheverysinglepageread

    HerbertFeutl (https://twitter.com/HerbertFeutl/status/11901471389913088)

    perfect beginners guide for python, will give u key to unlock magical world of

    python

    Dilip (https://twitter.com/Dili_mathilakam/status/220033783066411008)

    I should be doing my actual "work" but just found "A Byte of Python". A great

    guidewithgreatexamples.

    BiologistJohn (https://twitter.com/BiologistJohn/statuses/194726001803132928)

    Recently started readinga Byte of python.Awesome work. And that too for free.

    Highlyrecommendedforaspiringpythonistas.

    Mangesh (https://twitter.com/mangeshnanoti/status/225680668867321857)

    https://twitter.com/HerbertFeutl/status/11901471389913088https://twitter.com/Dili_mathilakam/status/220033783066411008https://twitter.com/BiologistJohn/statuses/194726001803132928https://twitter.com/mangeshnanoti/status/225680668867321857mailto:joshrob@poczta.onet.plmailto:wmich50@theramp.nethttps://twitter.com/ShanRajasekaran/status/268910645842423809https://twitter.com/nickaigi/status/175508815729541120

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 5/165

    A Byte of Python, written by Swaroop. (this is the book Im currently reading).

    Probably the best to start with, and probably the best in the world for every

    newbieorevenamoreexperienceduser.

    Apostolos (http://apas.gr/2010/04/27/learningpython/)

    EnjoyingReading#ByteOfPythonby@swaroopchbestbookever

    YuvrajSharma (https://twitter.com/YuvrajPoudyal/status/448050415356346368)

    Thank youso much forwriting A ByteOf Python. I just started learninghow to

    code two daysago and Imalready buildingsomesimple games.Your guidehas

    beenadreamandIjustwantedtoletyouknowhowvaluableithasbeen.

    Franklin

    Im fromDayanandasagarCollegeof Engineering (7th sem,CSE).Firstly iwant

    to say thatyourbook "Thebyteof python" is toogooda book fora beginner in

    python like me.The concepts are so well explained with simple examples that

    helpedmetoeasilylearnpython.Thankyousomuch.

    Madhura

    I am a 18 year old IT student studying at University in Ireland. I would like to

    express mygratitude to you for writing yourbook "AByte of Python", I already

    hadknowledgeof3programminglangaguesC,JavaandJavascript,andPython

    wasbyfar theeasiest langagueIhaveever learned,and thatwasmainlybecause

    yourbookwas fantasticandmade learningpythonverysimpleand interesting. It

    isoneofthebestwrittenandeasyto followprogrammingbooks Ihaveeverread.

    Congratulationsandkeepupthegreatwork.

    Matt

    Hi, ImfromDominicanRepublic.Myname isPavel, recentlyI readyourbookA

    Byte of Pythonand I consider it excellent!! :). I learnt much from all the

    examples.Yourbookisofgreathelpfornewbieslikeme

    PavelSimo

    https://twitter.com/YuvrajPoudyal/status/448050415356346368mailto:pavel.simo@gmail.comhttp://apas.gr/2010/04/27/learning-python/

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 6/165

    Iam astudent fromChina, Now ,Ihave readyoubookAbyteofPython, Oh its

    beautiful.Thebookisverysimplebutcanhelpall the first learnners.YouknowI

    am interesting in Java and cloud computing many times, i have to coding

    programm for the server, so i think python is a good choice, finish your book, i

    think itsnot onlya goodchoice its mustuse thePython.MyEnglish isnot very

    well, the email to you, i just wanna thank you! Best Wishes for you and your

    family.

    RoyLau

    I recently finishedreading Byte of Python,and I thought I reallyought to thank

    you. I was very sad to reach the final pages as I now have to go back to dull,

    tedious oreilly or etc. manuals for learning about python. Anyway, I really

    appreciateyourbook.

    SamuelYoung

    Dear Swaroop, I am taking a class from an instructor that has no interest in

    teaching.We are using Learning Python, secondedition, by OReilly. It is not a

    text for beginner without any programming knowledge, and an instructor that

    shouldbeworking inanotherfield.Thankyouverymuch foryourbook,withoutit

    I would be clueless about Python and programming. Thanks a million, you are

    able tobreak themessagedowntoa level thatbeginnerscanunderstandandnot

    everyonecan.

    JosephDuarte

    I love your book! It is the greatest Python tutorial ever, and a very useful

    reference.Brilliant,atruemasterpiece!Keepupthegoodwork!

    ChrisAndrSommerseth

    mailto:jduarte1@cfl.rr.commailto:sy137@gmail.com

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 7/165

    Firstof all, Iwant to say thanks toyou for thisgreate book. I think it is agood

    bookforthosewhoarelookingforabeginnerstutorialforPython.

    It isabouttwoor thereyearsago, I think,when Ifirstheardof thisbook.At that

    time, I am not able to read some book in English yet, so I got a chinese

    translation,whichtookmeintothegateofPythonprogramming.

    Recently, I reread this book. This time, of course, the english version. I couldnt

    believe that Icanread thewholebookwithoutmydictionaryathand.Ofcourse,

    itallduestoyourefforttomakethisbookaneasytounderstandone.

    myd7349 (https://github.com/swaroopch/byte_of_python/pull/13)

    Im justemailingyou to thankyou forwritingByteofPythononline. Ihadbeen

    attempting Python for a few months prior to stumbling across your book, and

    althoughImadelimitedsuccesswithpyGame,Inevercompletedaprogram.

    Thankstoyoursimplificationofthecategories,Pythonactuallyseemsareachable

    goal. It seems like Ihave finally learned the foundationsand Ican continue into

    myrealgoal,gamedevelopment.

    Onceagain, thanksVERYmuch forplacingsuchastructuredandhelpfulguideto

    basic programming on the web. It shoved me into and out of OOP with an

    understandingwheretwotextbookshadfailed.

    MattGallivan

    mailto:m_gallivan12@hotmail.comhttps://github.com/swaroopch/byte_of_python/pull/13

  • 1/4/2015 AByteofPython

    http://www.swaroopch.com/notes/python/ 8/165

    Iwould like to thank you foryourbookAByteofPythonwhich imyself find the

    bestway to learn python. I ama 15yearold i live inegypt myname isAhmed.

    Pythonwasmysecondprogramminglanguagei learnvisualbasic6at schoolbut

    didntenjoy it,however i really enjoyed learningpython. Imade theaddressbook

    program and i was sucessful. i will try to start make more programs and read

    python programs (if you could tell me source that would be helpful). I will also

    starton learning javaand if youcan tellme where to find a tutorialas goodas

    yoursforjavathatwouldhelpmealot.Thanx.

    AhmedMohammed

    A wonderful resource for beginners wanting to learn more about Python is the

    110pagePDF tutorialAByteofPythonbySwaroopCH.It iswellwritten,easy

    tofollow,andmaybethebestintroductiontoPythonprogrammingavailable.

    DrewAmes (http://www.linux.com/feature/126522)

    Yesterday I got throughmost of Byte of Python on my Nokia N800 and its the

    easiest and most concise introduction to Python I have yet encountered. Highly

    recommendedasastartingpointforlearningPython.

    JasonDelport (http://paxmodept.com/telesto/blogitem.htm?id=627)

    Byte of Vim and Python by @swaroopch is by far the best works in technical

    writingtome.Excellentreads#FeelGoodFactor

    Surendran (http://twitter.com/suren/status/12840485454)

    "Byteofpython"bestonebyfarman

    (inresponse tothequestion"Cananyonesuggestagood, inexpensiveresourcefor

    learningthebasicsofPython?")

    JustinLoveTrue (http://www.facebook.com/pythonlang/posts/406873916788)

    TheBookByteofpythonwasveryhelpful..Thanksbigtime:)

    Chinmay (https://twitter.com/a_chinmay/status/258822633741762560)

    http://www.linux.com/feature/126522http://paxmodept.com/telesto/blogitem.htm?id=627mailto:sedo_91@hotmail.comhttp://www.facebook.com/pythonlang/posts/406873916788https://twitter.com/a_chinmay/status/258822633741762560http://twitter.com/suren/status/12840485454

  • 1/4/2015 AByteofPython

    ht