title |
---|
Instructions - Python Best Practices |
This repo should help you master Python in a hands-on manner, brought to you by Swimm.io.
The repo consists of hands-on, bite-sized exercises covering best-practices in Python (from basics to advanced), as well as specific modules or libraries (e.g., typing
).
This is a public repo maintinaed by Swimm.
- Basic Python knowledge.
- Have
python3
in your path launch Python with a version>=3.8
. That is, you should be able to launchpython3
from the terminal. - Install Swimm's IDE extension.
Before you take your first few steps it's important to set our expectations:
- The exercises for Python Best Practices are found under python_best_practices/ folder. For example, There, you have the folder python_best_practices/exercises/ for exercises. The exercises are ordered so go through them according to the filename - that is, start with python_best_practices/exercises/01_last_element.py, continue to python_best_practices/exercises/02_reverse.py and so on.
- In each exercise - you will have some code to complete.
- To test yourself, run
python3 -m doctest <file_name>
. For example, for the first exercise, run:python3 -m doctest 01_last_element.py
. - The technical specifications of what you need to achieve will be written as docstrings inside the code itself.
- At times, we would offer some "Recommended References" that will help you solve each specific challenge. We encourage you to search online and dive deeper on your own!
- After you complete each exercise, it is highly recommended to review the corresponding solution in the python_best_practices/solutions/ directory. For example - the solution for python_best_practices/exercises/01_last_element.py is in python_best_practices/solutions/01_last_element.py. The solution will show you a way to approach the exercise that might be different than yours, and at times - provide additional pointers.
Have fun and good luck!
Powered by Swimm