PDF generated using the open source mwlib toolkit
see http://code.pediapress.com/ for more information
A Byte of Python
v1.92 (for Python 3.0)
Python
2
Python
Choose your Python version:
If you want to learn the current Python€2.x, read
here
[1]
or download the PDF
[2]
If you want to learn the new Python€3.0, read here or
download the PDF
[3]
You can also buy a printed hardcopy.
[4]
Introduction
'A Byte of Python' is a book on programming using the Python language. It serves as a
tutorial or guide to the Python language for a beginner audience. If all you know about
computers is how to save text files, then this is the book for you.
This book is updated for the new Python 3.0 language. If you are looking for a tutorial
on the current Python 2.x version, please download the previous revision of the book
[5]
. On
the same note, if you're wondering whether to learn Python 2.x or 3.x, then read this article
by James Bennett
[6]
.
Who Reads 'A Byte of Python'?
Here are what people are saying about the book:
Feedback From Readers
This is the best beginner's tutorial I've ever seen! Thank you for your effort.
- Walt Michalik (wmich50-at-theramp-dot-net)
You've made the best Python tutorial I've found on the Net. Great work. Thanks!
- Joshua Robin (joshrob-at-poczta-dot-onet-dot-pl)
Hi, I'm from Dominican Republic. My name is Pavel, recently I read your book 'A Byte
of Python' and I consider it excellent!! :). I learnt much from all the examples. Your
book is of great help for newbies like me...
- Pavel Simo (pavel-dot-simo-at-gmail-dot-com)
I recently finished reading Byte of Python, and I thought I really ought 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 appreciate your book
- Samuel Young (sy-one-three-seven-at-gmail-dot-com)
Dear Swaroop, I am taking a class from an instructor that has no interest in teaching.
We are using Learning Python, second edition, by O'Reilly. It is not a text for beginner
without any programming knowledge, and an instructor that should be working in
another field. Thank you very much for your book, without it I would be cluless about
Python and programming. Thanks a million, you are able to 'break the message down'
to a level that beginners can understand and not everyone can.
- Joseph Duarte (jduarte1-at-cfl-dot-rr-dot-com)
I love your book! It is the greatest Python tutorial ever, and a very useful reference.
Brilliant, a true masterpiece! Keep up the good work!
- Chris-André Sommerseth
Python
3
I'm just e-mailing you to thank you for writing Byte of Python online. I had been
attempting Python for a few months prior to stumbling across your book, and although
I made limited success with pyGame, I never completed a program.
Thanks to your simplification of the categories, Python actually seems a reachable
goal. It seems like I have finally learned the foundations and I can continue into my
real goal, game development.
...
Once again, thanks VERY much for placing such a structured and helpful guide to
basic programming on the web. It shoved me into and out of OOP with an
understanding where two text books had failed.
- Matt Gallivan (m-underscore-gallivan12-at-hotmail-dot-com)
I would like to thank you for your book 'A byte of python' which i myself find the best
way to learn python. I am a 15 year old i live in egypt my name is Ahmed. Python was
my second programming language i learn visual basic 6 at school but didn't enjoy it,
however i really enjoyed learning python. I made the addressbook 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 start on learning java and if you
can tell me where to find a tutorial as good as yours for java that would help me a lot.
Thanx.
- Ahmed Mohammed (sedo-underscore-91-at-hotmail-dot-com)
A wonderful resource for beginners wanting to learn more about Python is the
110-page PDF tutorial A Byte of Python by Swaroop C H. It is well-written, easy to
follow, and may be the best introduction to Python programming available.
- Drew Ames in an article on Scripting Scribus
[7]
published on Linux.com
Yesterday I got through most of Byte of Python on my Nokia N800 and it's the easiest
and most concise introduction to Python I have yet encountered. Highly recommended
as a starting point for learning Python.
- Jason Delport on his weblog
[8]
Academic Courses
This book is being used as instructional material in various educational institutions:
1. €'Principles of Programming Languages' course at Vrije Universiteit, Amsterdam
[9]
2. €'Basic Concepts of Computing' course at University of California, Davis
[10]
3. €'Programming With Python' course at Harvard University
[11]
4. €'Introduction to Programming' course at University of Leeds
[12]
5. €'Introduction to Application Programming' course at Boston University
[13]
6. €'Information Technology Skills for Meteorology' course at University of Oklahoma
[14]
7. €'Geoprocessing' course at Michigan State University
[15]
8. €'Multi Agent Semantic Web Systems' course at the University of Edinburgh
[16]
Python
4
Even NASA
The book is even used by NASA! It is being used in their Jet Propulsion Laboratory
[17]
with
their Deep Space Network project.
Official Recommendation
This book has been listed on the official website for Python in the Full Tutorials
[18]
section,
next to the official documentation.
License
1. €This book is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported
[19]
license.
• €This means:
• €You are free to Share i.e. to copy, distribute and transmit this book
• €You are free to Remix i.e. to adapt this book
• €Under the following conditions:
• €Attribution. You must attribute the work in the manner specified by the author or
licensor (but not in any way that suggests that they endorse you or your use of this
book).
• €Share Alike. If you alter, transform, or build upon this work, you may distribute the
resulting work only under the same or similar license to this one.
• €For any reuse or distribution, you must make clear to others the license terms of this
book.
• €Any of the above conditions can be waived if you get permission from the copyright
holder.
• €Nothing in this license impairs or restricts the author's moral rights.
2. €Attribution must be shown by linking back to http:/ / www. swaroopch. com/ notes/
Python and clearly indicating that the original text can be fetched from this location.
3. €All the code/scripts provided in this book is licensed under the 3-clause BSD License
[20]
unless otherwise noted.
4. €Volunteer contributions to this original book must be under this same license and the
copyright must be assigned to the main author of this book.
Read Now
You can read the book online at Python_en:Table of Contents.
Buy the Book
A printed hardcopy of the book can be purchased
[21]
for your offline reading pleasure, and
to support the continued development and improvement of this book.
Download
• €PDF (631KB)
[22]
• €Mediawiki XML dump (276KB)
[23]
(for advanced users only)
If you wish to support the continued development of this book, please consider
making a donation
[24]
or buy a printed hardcopy
[25]
.
Python
5
Translations
If you are interested in reading or contributing translations of this book to other human
languages, please see Translations.
Next
References
[1] €http:/ / www. ibiblio. org/ swaroopch/ byteofpython/ read/
[2] €http:/ / www. ibiblio. org/ swaroopch/ byteofpython/ files/ 120/ byteofpython_120. pdf
[3] €http:/ / www. swaroopch. com/ files/ byteofpython/ byte_of_python_v191. pdf
[4] €http:/ / www. swaroopch. com/ buybook
[5] €http:/ / www. ibiblio. org/ swaroopch/ byteofpython/ files/ 120/
[6] €http:/ / www. b-list. org/ weblog/ 2008/ dec/ 05/ python-3000/
[7] €http:/ / www. linux. com/ feature/ 126522
[8] €http:/ / paxmodept. com/ telesto/ blogitem. htm?id=627
[9] €http:/ / www. few. vu. nl/ ~nsilvis/ PPL/ 2007/ index. html
[10] €http:/ / www. cs. ucdavis. edu/ courses/ exp_course_desc/ 10. html
[11] €http:/ / www. people. fas. harvard. edu/ ~preshman/ python_winter. html
[12] €http:/ / www. comp. leeds. ac. uk/ acom1900/
[13] €http:/ / www. cs. bu. edu/ courses/ cs108/ materials. html
[14] €http:/ / gentry. metr. ou. edu/ byteofpython/
[15] €http:/ / www. msu. edu/ ~ashton/ classes/ 825/ index. html
[16] €http:/ / homepages. inf. ed. ac. uk/ ewan/ masws/
[17] €http:/ / dsnra. jpl. nasa. gov/ software/ Python/ byte-of-python/ output/
byteofpython_html/
[18] €http:/ / www. python. org/ doc/ intros/
[19] €http:/ / creativecommons. org/ licenses/ by-sa/ 3. 0/
[20] €http:/ / www. opensource. org/ licenses/ bsd-license. php
[21] €http:/ / www. swaroopch. com/ buybook
[22] €http:/ / www. swaroopch. com/ files/ byteofpython/ byte_of_python_v191. pdf
[23] €http:/ / www. swaroopch. com/ files/ byteofpython/ byte_of_python_v191. xml
[24] €https:/ / www. paypal. com/ cgi-bin/ webscr?cmd=_donations&
business=swaroop%40swaroopch%2ecom& item_name=A%20Byte%20of%20Python&
no_shipping=0& no_note=1& tax=0& currency_code=USD& lc=IN&
bn=PP%2dDonationsBF& charset=UTF%2d8
[25] €http:/ / www. swaroopch. com/ buybook
Source: http:/ / www. swaroopch. com/ mediawiki/ index. php? oldid=1391
Contributors: Swaroop, 1 anonymous edits