Python is a high-level, interactive and object-oriented programming language. Its simple syntax makes it easy to learn and fast to work with, so it's a great choice for a first programming language.
No tutorial is good for everyone. This one is aimed at people with no programming experience at all or very little programming experience. If you have programmed a lot in the past using some other language you probably want to read the official tutorial instead.
This tutorial was written in Python 3, and you need Python 3 or newer to be able to run the example code yourself. Python 2 is getting outdated all the time, and more and more projects are moving to Python 3. There are a few popular libraries that don't support Python 3 that well at the time of writing this, but you don't need to worry about that just yet. They will probably support Python 3 by the time you've learned the basics and you may actually need them.
I have tested most of the code in this tutorial on Python 3.4, but everything should also work on Python 3.2 and all newer Pythons.
- What is programming?
- Installing Python
- Getting started with Python
- ThinkPython: The way of the program
- Variables, Booleans and None
- Using functions
- If, else and elif
- Handy stuff with strings
- Lists and tuples
- Loops
- Trey Hunner: zip and enumerate
- Dictionaries
- Defining functions
- What is true?
- Files
- Exceptions
- Modules
- Classes
Other things this tutorial comes with:
I'm Akuli and I have written most of this tutorial, but the following people have helped me with it:
- SpiritualForest: Lots of typing error fixes.
- theelous3: Small improvements and fixes.
You may use this tutorial at your own risk. See LICENSE.