I've been coding in PHP for almost ten years, but I've lately become interested in Python. What Python book would you recommend?
I'll second that, Dive into python probably is the way to go but it might be boring at some points if you already know object oriented programing.
Python in a Nutshell, by Alex Martelli. It's a great language guide, and it can also serve as a tutorial.
In addition to the already mentioned Python in a Nutshell, let me strongly recommend the Python Cookbook : http://oreilly.com/catalog/9780596007973/?CMP=AFC-ak_book&ATT=Python+Cookbook
How about good old Programming Python by O'Reilly?
The reason I suggest it is: you already know what dynamic languages are about, you already know how to program in general. This book doesn't belabor syntax and basic concepts. It shows you what's unique and cool about Python, and then jumps straight into the myriad modules and features of the available Python libraries, with a specific focus on web programming.
It's a very large book and valuable equally as a reference and a way to simply inspire you to do cool things with Python. (The only downside is that it's a little too long and varied to read "all at once" as I like to do.)
I used to code PHP and switched to Python recently. I recommend 2 books.
"Dive Into Python". It's concise and suit someone who have a background in programming already.
Another book is How to Think Like a Computer Scientist, this one is for newbie though. Since you are not, I don't recommend you to read it. However, I think the book's exercises are very good for everyone who is new to Python.
I'll go for Dive into Python as Well.
But I realize how cool it would be to create a book edition "from language x to language X". Espacially with python, php and perl (the subject come back really often) and from python to C / java (so if you've started with python, you can learn these more easily, otherwise it will feel like a pain in the ass as for me : C seemed so horrible from a pythonista point of view).
I second Dive Into Python. There are also lots of other great Python books available online for free.
I’d recommend Learning Python (4th Edn.), by Mark Lutz as well.
It’s a very thorough treatment of the concepts of the language, as opposed to Dive into Python’s practical approach. I think they complement each other well, if you’re up for a lot of reading.
The 4th edition is good at covering the differences between Python 2 and 3.