How to Learn Python on Your Own
There are a lot of free and cheap resources for learning Python. Here we provide some tips for finding the most popular up-to-date tutorials and a book recommendation.
The first question you may be asking yourself is which version of Python you should be learning. The answer is almost definitely Python 3. Python 2, while still widely used, is the past. Python 3 is not only the future, it's the now. If you're just getting started learning Python, learn Python 3.
How to Choose a Python Tutorial
There are plenty of free Python tutorials to choose from on the web. There are generally two types:
- Tutorials that start with theory - These tutorials start by explaining why Python is so great, but they're likely to scare you into thinking that Python is extremely difficult to learn. It's not.
- Tutorials that start with code - We prefer this kind. They almost always start with a simple "Hello, World!" script that gets you using Python right away. Once you know how to do some fun stuff, you can go back and learn how Python is different from Java and what is meant by "high-level data structures" and "dynamic typing."
If you search Google for "Python tutorial", the likely first result is the tutorial on the official Python site. If you're already an experienced programmer, that might be a good place to start, but if you're not, we recommend you choose from one of the gentler Python tutorials below:
- Python 3 Basics Tutorial by Dr. Kristian Rother - a nice slow introduction to Python that will leave you wanting to learn more, which we believe should be the main goal of any introductory tutorial.
- The Python Guru - If you're using Windows, this is a nice, gentle tutorial to help you get started with Python. Skip the first chapter and jump right to the lesson on Installing Python.
- LearnPython.org interactive Python tutorial - If you can stand the ads, this tutorial gets you started with Python without having to install anything. However, if you really want to learn the language, you should go ahead and install Python. It's not that hard and it will make learning Python much easier.
How to Choose a Python Book
I'm biased, of course, but I think you should get my Python 3.8 book:
And, of course, if you're looking for professional Python training, please check out our courses.
Happy Python Learning!
- Checking the type of an object. A language must know the type of an object to know what can be done to it, what it can do and how it does the things it can do. For example, a number can be subtracted from another number, but text cannot be subtracted from a number.
- Dynamic Typing
- Typing that is done at run time. Dynamically typed languages, like Python, check the type of objects when they encounter them at run time. If your program tries to do something to an object that is not allowed, you will get an error when you run the program.
- Static Typing
- Typing that is done at compile time. Statically typed languages, like Java, check the type of an object when they are compiled. If your program tries to do something to an object that is not allowed, you will get an error when you compile the program, meaning that you won't be able to try to actually run the program until you fix the error and recompile.