A friend of mine just got into writing python. He's now asking if there are any resources for learning to write code more elegantly. Has anyone ever read anything that's helped you with the quality of your code?
Related somewhat to the Haskell reply, I'd advise being very _conscious_ of mutable state. You're in a high-level language which aims to support functional style in many places, so err towards minimising mutable state, and introduce it only with full consciousness of its purpose and consequences.
I'd like to cosign general sentiment of @apos's reply; learning varied languages will improve how you write code generally. Though for python specifically I would recommend Effective Python (amazon.com/Effecti...). I read it years ago and found it very useful. Besides books, I think you'll find that reading the PEPs and code on GitHub are both very useful.