Python: Fundamentals and the Python 2 to 3 upgrade
A Pro study guide on Python: 32 lessons in 6 parts, 7 hands-on Practical use cases. A Pro plan opens every lesson, practice question and Practical.
What you will learn
- Python basics - Running a program, indentation, names and numbers, strings and f-strings, operators and truthiness, and if, for and while. (5 lessons)
- Data structures and functions - Lists, tuples, dictionaries, sets and comprehensions, then functions, arguments, scope and lambdas. (5 lessons)
- Objects and errors - Classes and self, special methods, inheritance, exceptions with try and raise, and dataclasses. (5 lessons)
- Files, modules and packages - Reading and writing files, JSON and CSV, imports and the __main__ guard, virtual environments and pip. (4 lessons)
- Iterators, generators and decorators - How a for loop works, generators with yield, decorators and context managers. (4 lessons)
- The Python 2 to Python 3 upgrade - Why Python 3 broke compatibility and what changed: print, division, text versus bytes, lazy results, renamed modules, how to port safely, and why there is no Python 4. (9 lessons)
Hands-on Practical use cases
- Sales CSV report
- Contact book in the terminal
- Inventory with classes
- Log analyser with generators
- Weather API client
- Small REST service with a database
- Port a Python 2 script
Try the free version first
All tutorials · Practice quizzes