Depending on your current level of Python I will try to give you piece of advice related to learning Python. You can find recommended books and internet resources which correspond to your programming experience bellow.
This literature contains a lot of code examples. Please, do not be lazy and just copy/paste everything from source code examples and rename a few things but code out each bit yourself. For example, place book examples on the left side of your screen and place your text editor or IDE on the right side. Then line by line retype most complex and interesting examples from books and sites. The goal here is repetition, which will build up memory so that you learn how to do these things on your own without googling.
If Python is your first programming language or you don't know how loops work this section is for you.
You can ask me Which version of Python to learn Python2
or Python3
?
Unfortunately both :-) but I recommend you to start with Python 3.5+
in case
you do not have projects/work requirements for Python 2.7
. Then you should
review breaking changes between versions.
- Learn Python the Hard Way - Zed Shaw
Python2
- Think Python: How to Think Like a Computer Scientist - Allen B. Downey
Python3
After you get familiar with basic data types and language constructions it is time for performing useful and interesting small tasks. The best way to learn new language is to have a lot of coding and follow best practices. It can be done with help of following awesome sites like:
These sites contain a lot of tricky tasks grouped by complexity which are created by
experienced programmers. Not to mention the fact, that you can check your
solution using prepared tests. Also some popular solutions might use bad
practices but this happen mostly for new tasks and quite rare. Furthermore, if
your correct solution does not pass tests, check issue
link, some tasks might
have incorrect tests.
Moreover, from this point we have to dive in Python standard library and Python topics such as iterators, decorators, properties and so forth. Here are books which are worth a look:
- Python Essential Reference, 4th - David Beazley
Python2
- Core Python Programming - Wesley J Chun
Python2
/Python3
- The Python Standard Library by Example - Doug Hellmann
Python2
/Python3
- Expert Python Programming, 1st/2nd - Tarek Ziade
Python2
/Python3
- Fluent Python, 1st - Luciano Ramalho
Python3
- Python Cookbook, 3rd - David Beazley
Python3
- Python in a Nutshell, 3rd - Alex Martelli
Python2
/Python3
- Exploring CPython’s Internals - Python Developer's Guide
Python2/Python3
- CPython internals - Philip Guo
Python2
- Inside The Python Virtual Machine - Obi Ike-Nwosu
Python3
- Python insternals - Eli Bendersky
Python2
- Python Innards series - Yaniv Aknin
Python2
- Python Internals Series - Allison Kaptur
Python2
- Extending and Embedding the Python Interpreter
Python2
/Python3
Here is a list of non-python books recommended for reading.
Soft skills:
- The Passionate Programmer, 1st - Chad Fowler
- The Pragmatic Programmer: From Journeyman to Master, 1st - Andrew Hunt
- Code Complete: A Practical Handbook of Software Construction, 2nd - Steve McConnell
Hard skills:
- How Linux Works: What Every Superuser Should Know, 2nd - Brian Ward
- Design Patterns: Elements of Reusable Object-Oriented Software - GoF