Python is one of the most popular first programming languages, and you can learn a great deal of it for free. The best resource is one you will actually keep using, so try a few before committing.
Free resources
- The official Python Tutorial: clear and authoritative, available at docs.python.org. It is a useful reference once you know the basics.
- Python for Everybody: Dr. Charles Severance’s beginner course and free textbook.
- Harvard’s CS50 courses: including CS50’s Introduction to Programming with Python, which is free to audit.
- Automate the Boring Stuff with Python: a practical book by Al Sweigart, free to read online.
- freeCodeCamp: long free video courses and articles.
- Kaggle Learn: short Python and data science lessons.
Practice sites
- Exercism: coding exercises with optional mentoring.
- Project-based practice: build something small that you need, such as a file renamer or a budget tracker.
How to learn effectively
- Install Python, and write code from day one.
- Type out examples rather than copying and pasting.
- Build a small project after each topic.
- Learn to read error messages.
- Use Git to save your progress.
What to learn first
Start with variables, data types, loops, conditions and functions. Then move to lists, dictionaries and files, before choosing a path such as web development, data analysis or automation.