So, you’ve decided to learn Python.
Great choice! Python is a powerful, versatile programming language used for everything from web development to data science and machine learning. It’s also easy to read, so it’s well-suited for new and experienced programmers alike. Plus, Python skills are in high demand, so adding it to your tech stack can open the door to many job opportunities.
But there’s a lot to learn. Online courses — particularly interactive ones like our Learn Python 3 course — will help you build many of the skills you’ll need throughout your career. But it’s not uncommon to supplement your education if you want to master the language.
“To truly understand a field, you need to get input from multiple places,” says Codecademy Data Science Domain Manager Michelle McSweeney. “Sometimes books can add theoretical depth, sometimes they introduce more practical applications, but they always serve to help you enter into a culture of coding in addition to the practice.”
Ahead, Michelle shares five Python coding books that’ll help take you from Python newbie to Python expert.
If you’re completely new to programming
If you’re starting from scratch, Michelle recommends Python Programming: An Introduction to Computer Science by John Zelle. “It’s such a good foundation,” she says. “It provides a classic introduction to programmatic thinking via Python.”
Python Programming explores the fundamentals of computer science, programming, design, and problem-solving in a way that’s easy to understand. You’ll also learn how to write simple Python programs, and it’ll help you develop your ability to think like a programmer.
In fact, this book is used in many college-level computer science 101 courses. While it focuses on Python, the programming essentials and knowledge you'll gain can be of help throughout your development — especially as you start learning other languages.
The 3rd edition of Python Programming includes more recent updates and applications, and more closely aligns with what you'd find in a formal course.
If you want to learn about real-world use cases
Learn Python 3 the Hard Way by Zed Shaw is helpful for those who want to dive deeper into Python programming. “It’s an excellent resource,” Michelle says. “It’s a learn-by-example book and really helpful for getting some immediate practice to supplement your learning on Codecademy.”
Learn Python 3 the Hard Way shows you how to install Python on your computer and covers concepts like lists, loops, and data structures. It offers 52 practical exercises to help build your coding skills, and you’ll also learn more about Python’s applications in web development and game development.
If you want a comprehensive introduction to Python
If you want a better understanding of Python’s advanced features, check out Learning Python by Mark Lutz. “It’s a TOME,” Michelle says. “The thorough approach is right for some, but not for everyone.”
Learning Python teaches you how to use the latest versions of Python, and you’ll also navigate object types, code packages, exception-handling models, and development tools like decorators and metaclasses as you learn how to write organized and efficient code. It’s also a great introduction to object-oriented programming.
If you want to automate tasks
Automate the Boring Stuff with Python is a good choice if you’re just starting out, but it’s also a handy resource that can help you throughout your career. “It’s immediately useful and satisfying,” Michelle says. “It offers such quick recipes that you don’t have to do the thinking, it’ll just remind you how to do something.”
If you find yourself constantly dealing with repetitive tasks, Automate the Boring Stuff with Python could be right for you. You’ll learn how to create Python programs to automate file management, Excel spreadsheet updates, email reminders, text notifications, and downloading content from the internet.
If you want to learn about machine learning
Lastly, we have Introduction to Machine Learning with Python: A Guide for Data Scientists by Andreas Müller and Sarah Guido. As its title suggests, this book is great for anyone who wants to explore Python’s applications in machine learning.
Not only will you learn about the fundamental concepts of machine learning and different types of machine learning algorithms, but you’ll also learn how to use Python and tools like scikit-learn to build machine learning applications. If you’re making your way through our Data Scientist career path, this book is the perfect supplement.
Müller and Guido break down machine learning in an accessible way and explore the advantages and disadvantages of various algorithms. It also helps to have an understanding of matplot and NumPy, which you can learn in our Learn Statistics with NumPy and Visualize Data with Python courses.
Learn more about Python
Each of the books above will teach you more about Python and help build your skills as a programmer, but nothing expedites learning like hands-on practice. Check out our Python courses to learn more about the language.
Learn Python 3 offers an introduction to the latest version of the language, and after you’ve mastered the basics, try Learn Intermediate Python 3. We’ll also show you how to use Python for web development in Build Python Web Apps With Django. And if you’re interested in data science, try Build a Machine Learning Model with Python.