Just getting started with Python? Luckily you’ve already found this site, which pretty much guarantees you’ll be an expert hacker in no time. There are other nice resources out there, though. Here are a few.
The best way to improve your programming skills is to build stuff. Type code, save it, run it, repeat. The big secret is that you don’t have to come up with the code yourself for this to be effective, nor do you even have to understand every line you type. So find an area you’re interested in, find an existing Python tool or library related to that area, and work through some tutorials. Here’s a great list to browse.
Pay very close attention to things you mess up and things that confuse or frustrate you. Take them to a teacher or tutor, resolve them and voila! You’re a better programmer already!
Here are some links to tutorials you can start working on right away. If you’ve installed Anaconda Python, you already have the necessary libraries.
- Web Page Parsing - Try the Beautiful Soup tutorial and parse HTML like there’s no tomorrow.
- Building Web Applications - This Flask tutorial will have your first web server up and running in no time.
- Astro-stuff - Here’s a tutorial for reading FITS headers using the Astropy library. If you know what FITS headers are, this is for you.
- Plot/Chart/Graph - Here’s a quick start with the amazing Bokeh library for visualization.
- Social Network Analysis - Take a tour of NetworkX, a robust library for creating and analyzing graphs and networks.
Craving structured lessons, but held back by a fear of commitment? Supplement your training with an online class. Coursera has a course that I’ve heard good things about. MOOCs are easy to start, easy to quit, but along the way it’s usually possible to pick up some good experience.
The textbook from the above course is available for free online – take a look here. It’s well written and thorough. This is a great supplement for students who lack the confidence to hack blindly at code without a clue about what it does.
If you’d rather build a game, I highly recommend checking out Al Sweigart’s free Invent with Python textbook. I haven’t used it personally, but two students in one of my classes managed to build amazing games while picking up on plenty of Python fundamentals just by following this text.
If you’re writing and running code, you’re breaking code. This is not a failure to be avoided – it’s how stuff gets built, and how you learn to build stuff. When you get a nasty error message, take it to a search engine and cross your fingers that one of the top answers is from Stack Overflow. This question-and-answer site collects issues, bugs, workarounds and wisdom from tens of thousands of developers.
You might believe that experienced coders have some esoteric knowledge that you lack, but in fact most of them just have a few years experience Googling things and finding appropriate Stack Overflow answers. I maintain that you become a programmer the moment you resolve your first error with SO, so get to it!