News for hackers. Stuff that matters.

Ask HN: easy resources for learning Python?

I'm wondering if the community can point me to some easy resources to getting started with Python, starting from the basics of basics up to advanced usage.

I had an interview a couple weeks ago with a kickass startup company, who's owner frequents HN, for a front-end engineer position. Unfortunately, it turned out the role really needed someone with Python experience in addition to front-end skills. Needless to say, I was passed over but the interview was great and it was really cool to meet with their team.

So, what's the best way for me to transition from a creaky PHP history to Python? I have some ideas for my own startup(s), I'm sick of working where I'm at, but I don't want to fallback on PHP to launch a new service.

( 8 comments | 8 points | on HN )
Re:Ask HN: easy resources for learning Python? by mkuhn on Thursday February 26, 2009 @06:34AM (#495756)
I can recommend "Think Python: How to think like a Computer Scientist". It's free but can also be purchased (at least soon). It really starts with the basics but if you already know those you can skip them. http://www.greenteapress.com/thinkpython/thinkpython.html

Also I can recommend Dive Into Python: http://www.diveintopython.org/

Re:Ask HN: easy resources for learning Python? by whatusername on Thursday February 26, 2009 @08:12AM (#495808)
Re:Ask HN: easy resources for learning Python? by quantumhobbit on Thursday February 26, 2009 @11:57AM (#496066)
Pick a project and just start coding. The Python documentation is good enough that you should be able to teach yourself as you go. A coding contest site like Project Euler is a good source of quick problems to hone your skills on. Whenever you run into a tricky situation run a google search on it and you'll be surprised how often the solution is built into python.
Re:Ask HN: easy resources for learning Python? by godDLL on Thursday February 26, 2009 @09:27PM (#496746)
That's exactly my experience. "Dive into Python" made my head spin, confusingly enough (it is a great book). I did a small project (a deployment system that compiles HTML from a database of Markdown text using Jinja2 templating), coded it up real fast (I was amazed), refactored the thing to read easily and extend well, and just sat back. Just like that. I all made so much sense, while being so concise, I didn't realize it could be so elegant to write something, something readable, something you do not have to decipher when you get back to it later. I am absolutely sold.

So here's my two cents -- pick a project, a small one, not necessarily something you're going to sell or even release, some repetitive task you have to perform, for instance, and automate that with Python, bring some structure to it and see how that goes. You might be not as impressionable, but there is definitely immediate gains with this approach (besides scratching your own itch as with my example).

Re:Ask HN: easy resources for learning Python? by manvsmachine on Thursday February 26, 2009 @09:41AM (#495869)
I addition to books, I recommend getting an account with Google App Engine, which uses Python as its de facto language IIRC. You might not ever use the platform itself again, but it would provide a sandbox to play around in (assuming you don't already have a server of your own).
Re:Ask HN: easy resources for learning Python? by vladimir on Thursday February 26, 2009 @07:27AM (#495786)
I think Python documentation is a great resource for learning it.
Re:Ask HN: easy resources for learning Python? by peterlai on Friday February 27, 2009 @02:01AM (#496958)
Whenever I start with a new language, I read an O'Reilly book from cover to cover. For Python, this is the one I chose: "Learning Python" by Mark Lutz.
Re:Ask HN: easy resources for learning Python? by known on Thursday February 26, 2009 @08:59AM (#495841)