🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Good Python Book?

Started by
9 comments, last by Onikan 20 years ago
Can somebody recommend me a good book for learning Python? I've tried the tutorial at the Python site but I'm not getting the just of what a book could give me. I'm finding it too easy...compared to C++ that is.
Advertisement
Well, How to think like a Computer Scientist is a free book online that might be good.
Well, python really isn't difficult to learn, particularly if you already have some programming experience. If you really do want a book to learn from, there is "Learning Python 2nd ed" published by O'Reilly.

In my opinion, however, you can do well enough with what is available online. "Python in a nutshell" (also O'Reilly) is an adequate reference, that also covers some common modules outside of the standard library.

You may want to check out the Effbot guide to the standard library at some point, as well as the Python Cookbook site.

Online, there is also Bruce Eckel's Thinking in Python - which is not the same book as mentioned by Bakingsoda36, as well as Dive Into Python.

You can find a collection of python links here.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Well, Python really is that easy, when compared to C++! Once you have the basics learned, creating useful software is simple. Perhaps the best way to learn is by making something yourself.

To be honest, if you're an existing programmer then there's little point buying an introductory Python book as there's little that can be added to the supplied tutorial; everything you really need is there. Perhaps the most important pages outside the tutorial are the references for mapping types and sequence types, so that you can see the full potential of dictionaries and lists. For example, the .get() and .setdefault() methods of a dictionary are incredibly useful.

There are some nice advanced hints and tips in the Python Cookbook which is based on code from the online site mentioned by Fruny but features well-written commentary and explanation on each piece of code.
I second the recommendation for Dive Into Python, it's a really nice free ebook that goes through a lot of stuff. You should be familiar with programming before reading it, however.
I wouldn't know what to make with Python...also - would anybody be so kind to tell me how I get a user's input in Python? I looked through the tutorial and couldn't find anything [sad]
name = raw_input( "Hi. What's your name?" )
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
If you mean keyboard input, you can use raw_input() or input().
What about this book?

I'm learning Python now, however, I want to know if I could create a single-player RPG (a la Final Fantasy or Shadowrun (SNES)) with Python? What I mean is... I've read that Python isn't appropriate for large projects since it's slow... I hope the reader understands because I certainly don't know how to phrase my question correctly.

Also, what are some "useful" applications newbies can develop to learn Python faster?
Ultima Online 2 was originally going to be developed largely in Python. I don't think projects come much larger than that.

This topic is closed to new replies.

Advertisement