Resources for learning Python
Inspired by the Frontend Handbook, I made a list of resources for learning Python.
I composed this list to help aspiring developers learn Python. I picked sources that I personally used and that I liked most. I trust that these represent good craftsmanship, but note that there is always a chance for varying quality. At the end of the list, you can find some practical and personal advice for learning.
Start with one or more of these if you have no prior experience with Python.
- Python for you and me
- The Hitchhiker’s Guide to Python!
- Learn Python the Hard Way
- Computer Science 101
- Python on Codeacademy
- Problem Solving with Algorithms and Data Structures using Python
[read] [interact]This last one starts at very the beginnings but quickly delves deeper into algorithms, so it might be useful to check it out even if you already had some exposure to Python.
If you already have some experience with Python or a similar high-level language, the following sources are recommended.
- Design of Computer Programs
[watch] + [interact]
- Technical Interview
[watch] + [interact]
- Jeff Knupp’s articles
- Jeff’s book, Writing Idiomatic Python
- Effective Python
- Python Cookbook
- Python for Informatics
These are advanced topics for competent Pythonistas.
- Design patterns
- Learning Python Design Patterns
- Interview questions and answers for Python.
You can never read enough official Python documentation.
- Data model of the language. Take note of the special method names in particular.
- Execution model of the language
- What’s new in Python 3?
- Built-in functions in Python 3
- Python 3 Standard Library
- Itertools module
[read]An example from the above mentioned standard library.
- PEP8, Python’s Style Guide
- Google Style Guide
# Brain teasers, math problems & other fun stuff
# Personal advice
# The following works for me, but might not do it for you. Take it with a pinch of salt.
Get up early and start the day by resuming your coding session from last night — I find that the mind is most rested in the morning. Alternatively, start off by reading a section from any of the resources above.
Think about programming as many times as possible throughout the day. You might have an enlightment in an unexpected moment.
Try to think of programs you could write with your current skill set, and write them (regardless of whether anyone would use them or not). Strech your limits, but don’t start developing something that you know you are far from having the neccessary background knowledge for to finish.
Read offline. Seriously, people read differently online — they skim. Offline reading provides a deeper learning experience, and it’s nice to have a digital detox from time to time.
- Read other people’s code. Here are some examples:
- Read the implementation of a spelling corrector by Peter Norvig.
- Read other people’s solutions for Project Euler (after having solved them, or at least after trying to solve them for two days). Jason’s code blog is pretty neat for this.
- Read the source code of howdoi, a very useful command-line tool.
- Read the public code of your favorite company. Prezi offers some good python codebase to read.
- Read the source code of your favorite module. For a small project I used Basemap from the Matplotlib module, and it was highly beneficial to consult the source code (there were some things that were not entirely clear to me based on the documentation).
Time is your most valuable resource: don’t waste it on trivia. Block Reddit, Facebook, Twitter and any news portal you might visit, so you are not tempted to be distracted. You can easily do this with the
hostsfile on macOS, Windows or any Linux distribution.
- Always learn new tools and concepts. If you look at the code you have written in the past month and you cringe, you are doing great.
"Once you decide on your occupation… you must immerse yourself in your work. You have to fall in love with your work. Never complain about your job. You must dedicate your life to mastering your skill."
- Jiro Ono