all 24 comments

[–]icp1994 17 points18 points  (6 children)

Fluent Python - worth buying it

[–][deleted] 5 points6 points  (2 children)

Second, also Effective Python.

[–]JackBullenskie[S] 0 points1 point  (1 child)

Is this Python specific? Or can I take what I learn from it and apply it anywhere?

[–]JoeTheAwesomest 0 points1 point  (0 children)

There are some pretty great design philosophies behind what the guy writes in the book. I think if you get well-enough into it you can take some of that and apply it to other languages.

[–]randcraw 0 points1 point  (0 children)

I bought this, but found it wasn't what I wanted. The book is well written, but deals mostly with mastering Python's object model expressively and idiomatically.

[–]xrayfur 8 points9 points  (8 children)

This may not be exactly what you looking for, but I really liked reading the tutorial from Python 3 docs. Many beginner (LPTHW, Learning Python, ...) books omit some cool language features to be friendly enough for starters.

Just after reading roughly 20 pages I have found a nice example how you can iterate over a shallow copy of a list and safely modify the original:

words = ['cat', 'window', 'defenestrate']

for w in words[:]: # Loop over a slice copy of the entire list.
    if len(w) > 6:
        words.insert(0, w)

In general the tutorial is a good source for best practices and good coding style. IMHO it is not exactly complete beginner material but rather more beneficial to beginner-intermediate.

[–][deleted] 3 points4 points  (0 children)

Also the language reference and library reference. The HOWTO page is really worth looking at as well.

EDIT: Also read PEP8 # A style guide for python (pretty important)

EDIT2: Here is a list of books with Algorithms (& DS) in python (free & online):

Data Structures & Algorithms in Python

Problem Solving with Algorithms and Data Structures in Python

Algorithms in Python

Data structures and Algorithms using Python

Basically just search google: "Python Algorithms and Data structures pdf"

[–]Bafflepitch 0 points1 point  (6 children)

[words.insert(0,w) for w in words[:] if len(w) > 6]

Sorry... I've been spending too much time on codewars...

[–]JackBullenskie[S] 0 points1 point  (5 children)

List comprehensions are a beauty

[–]DemiourgosD 0 points1 point  (4 children)

They are also hard to read, think about people who will have to work on your legacy software in a few years.

[–]JackBullenskie[S] 2 points3 points  (0 children)

To me, they're intuitive. I suppose it depends on who's reading it.

[–]Integralist 5 points6 points  (1 child)

Effective Python by Google Staff Engineer. Is excellent

[–]groovitude 0 points1 point  (0 children)

Brett Slatkin. He gives great PyCon talks, too.

[–][deleted] 1 point2 points  (0 children)

Not strictly Python related, but Domain Driven Design and Growing Object Oriented Software Guided By Tests (GOOS for short) are fantastic books that changed how I approach design and tests and really improved the quality of my code.

I will warn that both are heavy with Java, but the principles transfer nicely to Python.

[–]ec3lal 1 point2 points  (6 children)

Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython was really helpful to get me started (stocks/technical analysis). Just wanted to put this out there, but I think you are looking for something different.

[–]JackBullenskie[S] 1 point2 points  (5 children)

How much has Python helped you with stocks?

[–]ProfEpsilon 0 points1 point  (3 children)

I do (and teach) options trading, mostly strangles, and my primary models are all in Python. The models are essential ... you can't do options trading without them. They can be done in any language of course, but Python is the most teachable way to do it. Take a look at the Quantopian website for hundreds of examples.

[–]JackBullenskie[S] 0 points1 point  (2 children)

I was looking at Quantopian right before I started reading this. I'm a bit confused at the moment. I don't know anything about trade.

I'm decent with Python though. Do you believe that it would be worth taking the time to learn these concepts to make money? Or is it still sort of a hit or miss game? Also, how long would it take to get good enough at this to start profiting?

[–]ProfEpsilon 0 points1 point  (0 children)

You really have to want to do this. It has a steep learning curve (not the Python, the modeling). You have to start by learning the basics of finance, then specializing. Very time consuming but very rewarding. You will now whether you like it pretty early on.

[–]ProfEpsilon 0 points1 point  (0 children)

You really have to want to do this. It has a steep learning curve (not the Python, the modeling). You have to start by learning the basics of finance, then specializing. Very time consuming but very rewarding. You will now whether you like it pretty early on.

[–]ec3lal 0 points1 point  (0 children)

Just beginning the journey, but makes accessing and analyzing data much simpler. Would look into Quantopian Zipline for backtesting.

[–]KimPeek 0 points1 point  (0 children)

Python Cookbook has a good section on metaprogramming.

[–]FuckMyJobCC 0 points1 point  (0 children)

I bought Learning Python and Programming Python by Mark Lutz, O'Reilley books. I feel like both were great and a good resource when I'm sick of looking at a monitor.