AI & Python #33: 4 Python Books That Every Beginner Should Read to Go Beyond The Basics
Move from nooby to advanced Python programmer.
If you’ve already mastered the basics of Python, know how to automate stuff, and are able to do simple tasks at work, but still feel you could do more, it’s time to take your Python skills to the next level.
Probably your current Python skills are enough for your personal projects or to keep your boss happy, but there’s a lot more to learn! Now you might not pay attention to scalability, readability, and organization when writing code, but if you want to move from beginner to advanced Python programmer, these are some of the topics you should learn next.
Here are 4 books that cover intermediate and advanced programming concepts that you should learn to go beyond the basic Python stuff.
Object-Oriented Python
If you have a basic knowledge of Python, you probably write code following a sequence of steps line by line to get things done. As a result, you end up with multiple sections that don’t have a strong logical connection. This is known as procedural programming, which isn’t bad for general-purpose programming, but this creates code that is neither reusable nor easy to scale.
If you want to take your Python skills to the next level you should learn object-oriented programming (OOP). With OOP, we can break a program into reusable blueprint-like components. In OOP we use classes, which are the foundation of Python objects — if we master classes, we can create any type of Python objects, therefore any type of program.
A good book for learning OOP in Python is Object-Oriented Python by Irv Kalb. This book covers cover the basics of OOP and put theory into practice using the pygame package. You’ll learn key concepts of OOP such as encapsulation, polymorphism, and inheritance. In the end, you’ll build a complete video game with animations and sounds.
Clean Code in Python: Develop maintainable and efficient code
As a beginner, you probably write code to get things done fast at the expense of organization, readability, and testability, which might lead you to write spaghetti code.
How to overcome this? Writing clean code.
If you learn Python and want to develop maintainable and efficient code, you should read Clean Code in Python by Mariano Anaya. The book covers topics such as Pythonic code, the SOLID principles, decorators, generators, iterators, asynchronous programming, unit testing, refactoring, and more! To sum it up, many concepts you need to become an advanced programmer.
By the end of the book, you’ll be able to apply industry-approved coding practices to design clean, sustainable, and readable real-world Python code.
Note: Another good option is “Beyond the Basic Stuff with Python” by Al Sweigart. In that book, you’ll also learn how to use tools like the command line, code formatters, type checkers, linters, and version control.
Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More
Serious Python is a book written for developers and experienced programmers that brings together over 15 years of Python experience to teach you how to avoid common mistakes, write code more efficiently, and build better programs in less time.
If you ever wanted to get advice from experts and sharpen your Python skills, this is the perfect book for you. This book is a collection of practical tips and real-world advice for tackling common Python problems.
Here are some of the things covered in this book:
What you should consider before you take a project
Python modules, libraries, and frameworks (and how they work under the hood)
How to document your project and manage an API as your project grows
How to handle time zones in your programs
Packaging and distribution standards
Methods and decorators
Functional programming
Performance and optimization
Scaling and architecture
How to manage relational databases.
The best part of the book is that at the end of each chapter, there’s an interview with expert Python developers who share real-world advice from years of experience.
Fluent Python: Clear, Concise, and Effective Programming
Everyone likes Python because of its simplicity. That’s good when you start learning the language, but once you master the basics, you should unlock the full potential of Python. To do so, you must learn how to write effective, idiomatic Python code by leveraging its best features
In the book Fluent Python, you’ll learn how to make your code shorter, faster, and more readable at the same time.
Here are some of the topics that the book covers:
Python data model
Data structures: An array of sequences, dictionaries and sets, and text vs bytes.
Functions as objects
Object-oriented idioms: References, mutability, interfaces, operator overloading, and multiple inheritance.
Control flow: Context managers, generators, coroutines, and concurrency with futures and asyncio.
Metaprogramming: Dynamic attributes and properties, attribute descriptors, and class metaprogramming.
Any Python book recommendation? Share it in the comments!
Thanks for sharing Frank. Sometimes is hard to find good value for people moving from beginner level to advanced ☹️