Giter VIP home page Giter VIP logo

byte-of-python's Introduction

A Byte of Python

"A Byte of Python" is a free 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.

For Python version 3

This book will teach you to use Python version 3. There will also be guidance for you to adapt to the older and more common Python version 2 in the book.

Who reads A Byte of Python? {#who-reads-bop}

Here are what people are saying about the book:

Somewhere around 2004 - 05 when I was convinced I wasn’t smart enough to be a programmer , I came came across the original A Byte of #Python, and that changed my entire perspective on computing and life , I owe a lot to that book @swaroopch had written. -- Rahul on Jul 30, 2020

This is the book that got me into programming almost a decade ago. Thank you @swaroopch. You changed my life. -- Stefan Froelich on Aug 2, 2019

I am writing this email to thank you for the great help your book has done for me! It was a really good book that I enjoyed thoroughly. As a 15 year old who has never done programming before, trying to learn Python online was difficult and I couldn't understand anything. But I felt like your book gave was much easier to understand and eased me into the whole new world of programming. Thanks to you, I can now write a high level language with ease. I thought programming would be hard and boring, but with your book's help, I realised how fun and interesting yet simple it can be! I would like to thank you again for your hard work on helping out beginners like me. -- Prottyashita Tahiyat on Sep 17, 2019

This is the best beginner's tutorial I've ever seen! Thank you for your effort. -- Walt Michalik

The best thing i found was "A Byte of Python", which is simply a brilliant book for a beginner. It's well written, the concepts are well explained with self evident examples. -- Joshua Robin

Excellent gentle introduction to programming #Python for beginners -- Shan Rajasekaran

start to love python with every single page read -- Herbert Feutl

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

I should be doing my actual "work" but just found "A Byte of Python". A great guide with great examples. -- Biologist John

Recently started reading a Byte of python. Awesome work. And that too for free. Highly recommended for aspiring pythonistas. -- Mangesh

A Byte of Python, written by Swaroop. (this is the book I'm currently reading). Probably the best to start with, and probably the best in the world for every newbie or even a more experienced user. -- Apostolos

Enjoying Reading #ByteOfPython by @swaroopch best book ever -- Yuvraj Sharma

A Byte of Python by @swaroopch is still the "Best newbie guide to python" -- Nickson Kaigi

Thank you so much for writing A Byte Of Python. I just started learning how to code two days ago and I'm already building some simple games. Your guide has been a dream and I just wanted to let you know how valuable it has been. -- Franklin

I'm from Dayanandasagar College of Engineering (7th sem, CSE). Firstly i want to say that your book "The byte of python" is too good a book for a beginner in python like me.The concepts are so well explained with simple examples that helped me to easily learn python. Thank you so much. -- Madhura

I am a 18 year old IT student studying at University in Ireland. I would like to express my gratitude to you for writing your book "A Byte of Python", I already had knowledge of 3 programming langagues - C, Java and Javascript, and Python was by far the easiest langague I have ever learned, and that was mainly because your book was fantastic and made learning python very simple and interesting. It is one of the best written and easy to follow programming books I have ever read. Congratulations and keep up the great work. -- Matt

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

I am a student from China, Now ,I have read you book A byte of Python, Oh it's beautiful. The book is very simple but can help all the first learnners. You know I 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 its not only a good choice its must use the Python. My English is not very well, the email to you, i just wanna thank you! Best Wishes for you and your family. -- Roy Lau

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

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 clueless 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

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

First of all, I want to say thanks to you for this great book. I think it is a good book for those who are looking for a beginner's tutorial for Python. It is about two or there years ago, I think, when I first heard of this book. At that time, I was unable to read books in English yet, so I got a chinese translation, which took me into the gate of Python programming. Recently, I reread this book. This time, of course, the english version. I couldn't believe that I can read the whole book without my dictionary at hand. Of course, it all dues to your effort to make this book an easy-to-understand one. -- myd7349

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

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

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

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

Byte of Vim and Python by @swaroopch is by far the best works in technical writing to me. Excellent reads #FeelGoodFactor -- Surendran

"Byte of python" best one by far man (in response to the question "Can anyone suggest a good, inexpensive resource for learning the basics of Python? ") -- Justin LoveTrue

The Book Byte of python was very helpful ..Thanks bigtime :) Chinmay

Always been a fan of A Byte of Python - made for both new and experienced programmers. -- Patrick Harrington

I started learning python few days ago from your book..thanks for such a nice book. it is so well written, you made my life easy..so you found a new fan of yours..thats me :) tons of thanks. -- Gadadhari Bheem

Before I started to learn Python, I've acquired basic programming skills in Assembly, C, C++, C# and Java. The very reason I wanted to learn Python is it's popular (people are talking about it) and powerful (reality). This book written by Mr. Swaroop is a very good guide for both brand-new programmers and new python programmers. Took 10 half days to go through it. Great Help! -- Fang Biyi (PhD Candidate ECE, Michigan State University)

Thank you ever so much for this book!! This book cleared up many questions I had about certain aspects of Python such as object oriented programming. I do not feel like an expert at OO but I know this book helped me on a first step or two. I have now written several python programs that actually do real things for me as a system administrator. They are all procedural oriented but they are small by most peoples standards. Again, thanks for this book. Thank you for having it on the web. -- Bob

I just want to thank you for writing the first book on programming I've ever really read. Python is now my first language, and I can just imagine all the possibilities. So thank you for giving me the tools to create things I never would have imagined I could do before. -- "The Walrus"

I wanted to thank you for writing A Byte Of Python (2 & 3 Versions). It has been invaluable to my learning experience in Python & Programming in general. Needless to say, I am a beginner in the programming world, a couple of months of self study up to this point. I had been using youtube tutorials & some other online tutorials including other free books. I decided to dig into your book yesterday, & I've learned more on the first few pages than any other book or tutorial. A few things I had been confused about, were cleared right up with a GREAT example & explanation. Can't wait to read (and learn) more!! Thank you so much for not only writing the book, but for putting it under the creative commons license (free). Thank goodness there are unselfish people like you out there to help & teach the rest of us. -- Chris

I wrote you back in 2011 and I was just getting into Python and wanted to thank you for your tutorial "A Byte of Python". Without it, I would have fallen by the wayside. Since then I have gone on to program a number of functions in my organization with this language with yet more on the horizon. I would not call myself an advanced programmer by any stretch but I notice the occasional request for assistance now from others since I started using it. I discovered, while reading "Byte" why I had ceased studying C and C++ and it was because the book given to me started out with an example containing an augmented assignment. Of course, there was no explanation for this arrangement of operators and I fell on my head trying to make sense of what was on the written page. As I recall it was a most frustrating exercise which I eventually abandoned. Doesn't mean C or C++ is impossible to learn, or even that I am stupid, but it does mean that the documentation I worked my way through did not define the symbols and words which is an essential part of any instruction. Just as computers will not be able to understand a computer word or computer symbol that is outside the syntax for the language being used, a student new to any field will not grasp his subject if he encounters words or symbols for which there are no definitions. You get a "blue screen" as it were in either case. The solution is simple, though: find the word or symbol and get the proper definition or symbol and lo and behold,the computer or student can proceed. Your book was so well put together that I found very little in it I couldn't grasp. So, thank you. I encourage you to continue to include full definitions of terms. The documentation with Python is good, once you know, (the examples are its strength from what I see) but in many cases it seems that you have to know in order to understand the documentation which to my mind is not what should be. Third party tutorials express the need for clarification of the documentation and their success largely depends on the words that are used to describe the terminology. I have recommended your book to many others. Some in Australia, some in the Caribbean and yet others in the US. It fills a niche no others do. I hope you are doing well and wish you all the success in the future. -- Nick

hey, this is ankush(19). I was facing a great difficulty to start with python. I tried a lot of books but all were bulkier and not target oriented; and then i found this lovely one, which made me love python in no time. Thanks a lot for this "beautiful piece of book". -- Ankush

I would like to thank you for your excellent guide on Python. I am a molecular biologist (with little programming background) and for my work I need to handle big datasets of DNA sequences and to analyse microscope images. For both things, programming in python has been useful, if not essential to complete and publish a 6-years project. That such a guide is freely available is a clear sign that the forces of evil are not yet ruling the world! :) -- Luca

Since this is going to be the first language you learn, you should use A Byte of Python. It really gives a proper introduction into programming in Python and it is paced well enough for the average beginner. The most important thing from then on will be actually starting to practice making your own little programs. -- "{Unregistered}"

Just to say a loud and happy thank you very much for publishing "A Byte of Python" and "A Byte of Vim". Those books were very useful to me four or five years ago when I starting learning programming. Right now I'm developing a project that was a dream for a long, long time and just want to say thank you. Keep walking. You are a source of motivation. All the best. -- Jocimar

Finished reading A byte of Python in 3 days. It is thoroughly interesting. Not a single page was boring. I want to understand the Orca screen reader code. Your book has hopefully equipped me for it. -- Dattatray

Hi, 'A byte of python' is really a good reading for python beginners. So, again, NICE WORK! i'm a 4 years experienced Java&C developer from China. Recently, i want to do some work on zim-wiki note project which uses pygtk to implement. i read your book in 6 days, and i can read and write python code examples now. thx for your contribution. plz keep your enthusiasm to make this world better, this is just a little encourage from China. -- Lee

I am Isen from Taiwan, who is a graduating PhD student in Electrical Engineering Department of National Taiwan University. I would like to thank you for your great book. I think it is not only just easy to read but also comprehensive and complete for a new comer of Python. The reason I read your book is that I am starting to work on the GNU Radio framework. Your book let me catch most of important core ideas and skill of Python with a minimum time. I also saw that you do not mind that readers send you a thank note in your book. So I really like your book and appreciate it. Thanks. -- Isen I-Chun Chao

The book is even used by NASA! It is used in their Jet Propulsion Laboratory with their Deep Space Network project.

Academic Courses

This book is/was being used as instructional material in various educational institutions:

License

This book is licensed under a Creative Commons Attribution-ShareAlike 4.0 International 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 make changes to this book (especially translations)
  • You are free to use it for commercial purposes

Please note:

  • Please do not sell electronic or printed copies of the book unless you have clearly and prominently mentioned in the description that these copies are not from the original author of this book.
  • Attribution must be shown in the introductory description and front page of the document by linking back to {{ book.officialUrl }} and clearly indicating that the original text can be fetched from this location.
  • All the code/scripts provided in this book is licensed under the 3-clause BSD License unless otherwise noted.

Read Now

You can read it online at {{ book.officialUrl }}

Buy The Book

A printed hardcopy of the book can be purchased at {{ book.buyBookUrl }} for your offline reading pleasure, and to support the continued development and improvement of this book.

Download

Visit {{ book.downloadUrl }} to download a PDF file (best for desktop reading) or an EPUB file (best for devices such as mobile, tablet, ebook readers).

Visit {{ book.sourceUrl }} for the raw content (for suggesting corrections, changes, translating, etc.)

Read the book in your native language

If you are interested in reading or contributing translations of this book to other human languages, please see Translations.

byte-of-python's People

Contributors

amarouter avatar amio avatar archerimagine avatar bborysenko avatar borisliu avatar brokenthorn avatar coffeeofmorpheus avatar d-s-1 avatar dbojan avatar ferrisvienna avatar gilianhuber avatar jahangir-sh avatar jooola avatar k-guan avatar kamikat avatar keithdotpower avatar lambda-abstraction avatar lengyueyang avatar mattiasduerrmeier avatar maxzheng avatar msiism avatar myd7349 avatar nanxiao avatar romain-gilliotte avatar rootulp avatar seanchao avatar swaroopch avatar techgaun avatar wind2esg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

byte-of-python's Issues

'+Terminal+' with wrong symbol '+'?

In Installation,

To verify, open the terminal by opening the +Terminal+ application or by pressing [Alt + F2] and entering +gnome-terminal+.

"fab html" gives single HTML page not styled

Hi,

Someone compiled translated version of "A byte of Python" and put it online: http://zhgdg.gitcafe.com/static/doc/byte_of_python.html

There are two issues (same in origin version from this repo):

  1. It is one page only; not suitable for at least some learners. You know GNU documentation always choice between "entirely on one web page" and "with one web page per node".
  2. The HTML is not styled, except the code snippet. Can you include a default style sheet? For example, the one used in pandoc demo: http://johnmacfarlane.net/pandoc/demo/pandoc.css

Maybe an inaccurate description in Inheritance section

Hi swaroopch,

I am reading your awesome byte-of-python, but find the following words in Inheritance from Object Oriented Programming may not be accurate:

To use inheritance, we specify the base class names in a tuple following the class name in the class definition. Next, we observe that the init method of the base class is explicitly called using the self variable so that we can initialize the base class part of the object. This is very important to remember - Python does not automatically call the constructor of the base class, you have to explicitly call it yourself.

I think "Python does not automatically call the constructor of the base class, you have to explicitly call it yourself." will mislead people. The root cause of this example is the __init__ method in derived class overrides the __init__ method in base class. Actually, Python does automatically call the constructor of the base class as long as the derived class doesn't override this method. E.g.:

class Base:	
	def __init__(self):
		print("Base __init__ is called!")

class Derived(Base):
	pass

Derived()

The output of above code is like this:
Base __init__ is called!

So if the derived class's method overrides base class's method, the base class's method won't be called, no matter it is __init__ or not:

class Base:	
	def Haha(self):
		print("Base Haha is called!")
		
class Derived(Base):
	def Haha(self):
		print("Derived Haha is called!")

Derived().Haha()

The result is:
Derived Haha is called!

Best Regards
Nan Xiao

Org version

I enjoyed reading this book. I read the Revision History and would like to suggest Org Mode as the next version. It supports exporting to AsciiDoc, LaTeX (PDF), HTML, etc. It renders well on GitHub. It also is an interactive format if people want, and supports (optionally) export to Jupyter (as requested by #104, #107, and presumably others).

This book is 10 years old - I suggest Org will still be around in 10 years, but many other formats may not exist in another 10 years.

PDF Document Properties "Commenting: Not Allowed"

pdf-commentingnotallowed
Right Click on the PDF Document, choose Document Properties, click Security Tab.

"Commenting: Not Allowed"

i was hoping to add comments and bookmarks and hilighting to parts of the document.

Newest (2014-12-02) or older versions of the PDF have the same issue. Have not figured out how to generate my own yet.

is '>a1b2_c3' a valid variable name?

In 06-basics.pd it said:

Examples of valid identifier names are i, __my_name, name_23, >a1b2_c3.

However, when I define the variable >a1b2_c3, the python(3.2.3) interpreter just complained

SyntaxError: invalid syntax

So,

  • The first character of the identifier must be a letter of the alphabet (uppercase ASCII or lowercase ASCII or Unicode character) or an underscore ('_').

Is it correct?

Thanks for attentions :)

Statement Missing in Control Flow Chapter

In Control Flow chapter, The for Loop section, the Example's explain, there is a line as:

Remember that the else part is optional. When included, it is always executed once after the for loop is over unless a <> statement is encountered.

It seems like the <> part is lost something.

I found in source file control_flow.md Line 99, this location has something:

Remember that the `else` part is optional. When included, 
it is always executed once after the `for` loop is over unless a <<the_break_statement,break>> statement is encountered.

So the problem seems like Markdown doesn't include this <the_break_statement,break> in HTML file.
Could you check this?

Format code using black ?

I though this change should be discussed a bit.

I propose to format the python code using black, in order to have consistent code across the book.
Consistency is also important in coding, so I though it should be applied in a learning book.

Asciidoc Syntax Fix

basics.md Line 310:

Similarly, we assign the literal string to the variable +s+ and then print it.

op_exp.md Line 197:

We store the result of the expression `length * breadth` in the variable +area+ and then print it using the +print+ function.

control_flow.md Line 22:

 We set the variable +number+ to any integer we want,

My fork is working for translating BoP so I can't make a pull request. Please bear with me. :)

xrange not part of python 3

In control_flow.md xrange is mentioned. xrange is however not a part of python 3. xrange has become range, and range of python 2 is equivalent with list(range()) in python 3.

Extention towards juypter books

I love the book and the website (I learned python with it). But I wonder if it would be possible to move the content towards a jupyter book such that the compute instructions become executable on something like binder without any needed installs.

Tab completion

It took me a long time before I read somewhere that in at least IPython/Jupyter Notebooks (including those on https://wakari.io), IDLE and Spyder tab completion can be used. Meaning that if you start a statement and then press the tab-key a list pops up from which you can choose a completion of your statement. Coming from Microsoft Visual Studio and RStudio where the lists pop up automatically, I didn't expect something like that. I just thought that Python environments didn't work that well, and Notebooks the least of all, because typing a dot doesn't result in a list.

Tab completion is very helpful for beginners (and experts alike I suppose) so I think it would help if this would be clearly mentioned in the book.

PDF file formatting

Hello. I am now reading your book as my second book for Python. The book is instructive! I am trying to copy the code from the book's PDF and have problems with formatting when I paste the code into VS Code. Copying the code from your website works correctly. Attach the file from VS Code:
function_keyword.zip

Thanks.

C/C --> C/C++

page 61
In C/C, if you want to write `for (int i = 0; i < 5; i)
In C/C++

Mobi layout (Kindle)

Hi, in a Kindle paperwhite the layout appears with too many tabs, sometimes the text starts at the next line, attached screenshot:

screen shot 2016-08-31 at 4 42 33 pm

Note: this is the .mobi file downloaded at the website: http://python.swaroopch.com

What tools are there to convert? Calibre can?

Link Syntax Error

In oop.md Line 49:

(We will learn <<init,more about instantiation>> in the next section)

It seems like it should be a link, but the syntax it is using is not a Markdown style.
Please have a check and fix it.

op_exp.md

// (divide and floor)

Divide x by y and round the answer down to# the nearest whole number
13 // 3 gives 4
-13 // 3 gives -5

the nearest whole number??

print(9/1.81)
4.972375690607735

print(9//1.81)
4.0

Notebook based versions of this course

Thanks for this wonderful bytes.

Feature Request

Can we create a Jupyter notebook or google colab notebook .
This will help to run the snippet within the page and the learner may not need to navigate/copy away to another editor/IDE.

Mention String interpolation?

The format method was introduced in the Basic chapter.

Since Python now has String interpolation, maybe it would be an idea to mention that also here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.