The Zen of Python is a set of aphorisms that encapsulate the soul of the language. Keep them handy!
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
To learn the basic of the language, we will start directly by doing the tutorials from LearnPython.org. You will learn about the basic concepts of the language, and you will be able to apply them right away by completing some simple exercises directly in your browser. If you have some experience with Python already, feel free to skip this – but it might still be useful as a refresher. And who knows, you might learn something new after all ;)
- Hello World!
- Variables and Types
- Lists
- Basic Operators
- String Formatting
- Basic String Operations
- Conditions
- Loops
- Functions
- Classes and Objects
- Dictionaries
- Modules and Packages
- Input and Output (I/O)
To progress in the course, we will move to local development. For this, you will need an Integrated Development Environment (IDE), and you will need to learn how to install Python and dependencies via virtual environments.
Give a quick read to the overview of Python IDEs.
We recommend starting with PyCharm or VS Code.
Follow this tutorial to understand why virtual environments are important and how to use them.
In the basics section, you learned about importing and using packages. How can we effectively keep track of all external packages in our project? This where dependency management tools come into play.
We recomment starting simply with pip combined with your venv, which you just learned about. Here is an excellent resource which will guide you on how to do that.
-
Code style and linting:
Feel free to take a look at the Advanced Tutorials section of the LearnPython page, and go through the tutorials that weren't covered in this week's syllabus. Some of those topics might be covered in the following weeks, but some of them might not!
You can also go through the official Python tutorial, which is a very comprehensive guide to everything you need to know about this great language.