You can learn Python basics within 12 hours; the trick is simple, code and read as much as possible.
“There’s no shortcut to learning Python.”
However, there is a way to become more proficient quicker. It comes down to practicing the foundational topics repeatedly, reading as much code as possible, researching when you don’t understand, and reading documentation.
There is no way to get around it; learning Python begins and ends with practice, practicing the fundamentals to where you are tired of looking at Python syntax.
Of course, to make it fun, you can always attempt to solve real-world problems. For instance, I wanted to compare toy prices between major retailers, so I learned how to scrape the information off their pages and save them to a file. As my skill level progressed, I automated the process; then, I began storing the results in a database, then I built a web front-end to display the toys. Thus, I slowly built up my skill with increasingly complex schemes. If you can’t think up a project, go through as many tutorials on beginner topics you like as possible, I recommend Real Python.
“Practice, Practice, Practice”
Here are the foundational topics you should cover. Learning Python fundamentals should only take you twelve hours.
Reading others’ code and documentation.
This section focuses on learning to read well-structured code and exposing yourself to enough of it to recognize coding patterns and an author’s signature style. You can read books about coding patterns all day, but until you are knee-deep in the weeds of some cool-ass Python library, your understanding of Python will never advance beyond the fundamentals. So instead, I advise that you find a package that does something extraordinary and try to understand how they implement specific methods.
For example, if you are interested in machine learning, I would recommend yellowbrick (not because I work on it) but because it only has three dependencies, thus making the code base relatively simple and easy to understand. Remember to use a library that you are already familiar with; dissecting the code is more straightforward.
Another helpful skill is learning how to read the documentation. Beginning with the official Python documentation and understanding the intricacies of the standard library wields a lot of power in how creative you can be when approaching problems. I would then move over to third-party libraries that interest you. Finally, I suggest you explore the Python Enhancement Proposal 8 (PEP8) so that your code structure adheres to the general Python convention.
“The best code writers read a lot.”
I’m not selling any snake oil. But, after teaching myself and others for the past ten years, you quickly learn what sticks. These three recommendations are tried and true. Practice and read as much as possible. You will have a good grasp of the fundamentals in about 12 hours.
Let me know what you are thinking.
Do you think this is a suitable method for learning Python?
1. Add your thoughts to the comments
2. Become a Fan and give me a Follow