jerry-git/learn-python3
Jupyter notebooks for teaching/learning Python 3
repo name | jerry-git/learn-python3 |
repo link | https://github.com/jerry-git/learn-python3 |
homepage | |
language | Python |
size (curr.) | 1196 kB |
stars (curr.) | 1495 |
created | 2018-05-01 |
license | MIT License |
Learn Python 3
Introduction
This repository contains a collection of materials for teaching/learning Python 3 (3.5+).
Requirements
- Have Python 3.5 or newer installed. You can check the version by typing
python3 --version
in your command line. You can download the latest Python version from here. - Have Jupyter Notebook installed.
If you can not access Python and/or Jupyter Notebook on your machine, you can still follow the web based materials. However, you should be able to use Jupyter Notebook in order to complete the exercises.
Usage
- Clone or download this repository.
- Run
jupyter notebook
command in your command line in the repository directory. - Jupyter Notebook session will open in the browser and you can start navigating through the materials.
Contributing
See contributing guide.
Beginner
- Strings [notebook] [exercise]
- Numbers [notebook] [exercise]
- Conditionals [notebook] [exercise]
- Lists [notebook] [exercise]
- Dictionaries [notebook] [exercise]
- For loops [notebook] [exercise]
- Functions [notebook] [exercise]
- Testing with pytest - part 1 [notebook] [exercise]
- Recap exercise 1 [exercise]
- File I\O [notebook] [exercise]
- Classes [notebook] [exercise]
- Exceptions [notebook] [exercise]
- Modules and packages [notebook]
- Debugging [notebook] [exercise]
- Goodies of the Standard Library - part 1 [notebook] [exercise]
- Testing with pytest - part 2 [notebook] [exercise]
- Virtual environment [notebook]
- Project structure [notebook]
- Recap exercise 2 [exercise]
Intermediate
Idiomatic Python
Python is a powerful language which contains many features not presented in most other programming languages. Idiomatic section will cover some of these Pythonic features in detail. These materials are especially useful for people with background in other programming languages.
- Idiomatic loops [notebook]
- Idiomatic dictionaries [notebook]
- Idiomatic Python - miscellaneous part 1 [notebook]
- Idiomatic Python - miscellaneous part 2 [notebook]
- Idiomatic Python exercise [exercise]
Step up your pytest
game
- Efficient use of fixtures [notebook]
- Other tips and tricks
Best practices
A list of best development practices for Python projects. Most of the practices listed here are also applicable for other languages, however the presented tooling focuses mainly on Python.
General topics
Backlog
- Sets
- Generators
- Decorators
- Context managers
- Playing with attributes
- *, *args, **kwargs
- Command line arguments with click
- OOP - inheritance
- OOP - Abstract Base Classes
- OOP - attrs
- Testing with mocks
- Structuring your tests
Use cases
Playing with the web
- requests
- testing requests with responses
- beautifulsoup4
- selenium
Communicating with databases
- SQLAlchemy
Working with documents
- excel
- openpyxl
- pdf
- pdfrw / PyPDF2
Credits
- Logo: Abdur-Rahmaan Janhangeer, @Abdur-rahmaanJ