This is a concise Python 3 programming tutorial.
I try to show everything with simple code examples; there are no long and complicated explanations with fancy words.
This tutorial is composed in a basic part, aimed at people with no programming experience at all or very little programming experience, and an advance one for people who want to learn more about python.
If you have programmed a lot in the past using some other language you may want to read the official tutorial also.
You can use Python 3.6 or any newer Python with this tutorial. Don't use Python 2.
If you write a Python 2 program now someone will need to convert it to Python 3 later, so it's best to just write Python 3 to begin with.
Python 3 code will work just fine in Python 4, so you don't need to worry about that. Python 2 also has horrible Unicode problems, so it's difficult to write Python 2 code that works correctly with non-English characters (like π and ♫).
The tutorial consists of three main sections:
This section will introduce to the concept of computer programming, and to the very basics of the Python programming language:
- The Way of the Program
- Variables, Statements and Expressions
- Introduction to Functions
- Setting up an editor
- Conditional Statements
Regardless you have already programmed before, using or not Python, I would suggest to take a look at this introductory section anyway. There is always time to skip, and you decide your learning pace.
This section will get you started with basic Python code and data structures.