Python has become one of the most important programming languages used for predictive analytics and machine learning.
For those who are unfamiliar with Python, the following resources are useful for learning the language. These resources appear in a (mostly) alphabetical order. Although I encourage anyone who is just learning this language to focus on Python 3 rather than Python 2 (the older version will stop being supported in 2020), some of these resources refer to the still-widely-used Python 2. Where I can, I’ve given you the perhaps dubious benefit of my first-hand knowledge. In other cases, I’ve gone by what a website says or I let you know what I’ve heard from others.
If you know of other sources that you think could be on this list, please shoot me an email at mark (at) vigoremedia.com. Also, leave a comment if any of the links don’t work properly.
18 Resources to Learn Python Programming: A shortish list of some of the best resources for learning Python. Many of these resources also appear in my list below, but there are few here that I’ve not yet checked out and so do not list.
80+ Best Free Python Tutorials, eBooks & PDF To Learn Programming Online: A nice collection of resources. I especially like its list of cheat sheets, which is something few other resource guides provide.
After Hours Programming Python 3 Tutorial: An online tutorial with which I’ve not had much experience. It does have a code simulator, but it doesn’t seem to require you to code something correctly to move on with the tutorial. That can be a good thing when you’re sick of being tested, and it can be a bad thing when you need to be really challenged.
Awesome Python: This is a source that I think is more useful for people who already have some Python skills. It is a curated list of Python frameworks, libraries, software and resources.
Beginning Python for Bioinformatics: beginner book specifically geared toward biologists.
The Best Way to Learn Python: A handy, dandy list of some great Python resources presented in the form of “assignments.”
Bootcamps: Bootcamps and development schools are places (physical or virtual) you go to learn specific programming skills in a matter of a few weeks. I’ve never attended one, but there are a number of websites devoted to helping you distinguish one from another. They include SwitchUp and Bootcamps.in. Bootcamps can be quite pricey, so it pays to be cautious and selective.
Byte of Python: An introductory text for beginners. For the most part, I think it’s clearly written. The author, Swaroop C.H., wrote it for Python 2, then updated it to Python 3, and then revised it back to Python 2 for reasons he explains in his book. But I’m glad I still have his PDF version on Python 3 on my mobile.
Challenge-based learning: As people progress, they may want to engage in challenges to hone their skills. There can be an overlap between “challenges” and “games” (for example, Check IO could be viewed as a game or a series of challenges). In other cases, challenges are more like competitions. Although I’ve not used it, one website I’ve found is Python Challenges. There are also sources such CodeFights and CodeWars. HackerRank bills itself as the largest learning and competition community for programmers.
Check iO: I have a crush on this gamified tutorial (or, maybe it’s more of a game that teaches). Here’s the hitch: you need to solve the problems before you can see how other people of have solved them. This drives me mad, though usually in a good way. I don’t have the chops to get to the end anytime soon, but it’s a terrific vehicle for taking my own lame solutions and then comparing them against some other tightly written solutions by programmers who are much better than I. This is sometimes humiliating, but also in a good way. And it’s a great way to learn how to write code that is more Pythonic.
CodeBuddies.org: This is a group of people who meet on Google Hangouts at scheduled times to talk about code (usually as it relates to specific books or projects) while sharing their screens. It’s intended to help participants stay motivated and learn faster. I’ve only been to a few hangouts, but it seems worthwhile.
Codecademy: If I hadn’t started messing around at Codecademy, I wouldn’t have learned the basics of Python. It has a very good, interactive online Python tutorial as well as a community to help support it. I recommend it.
Codementor: For a fee, this service “connects you with experienced mentors for instant help via screen sharing, video, and text chat.” I’ve not yet used it, but I’ve been tempted a few times when banging my head on an especially recalcitrant problem.
Computer Science Circles: A nice little interactive online tutorial sort of along the lines of the interactive version of How to Think Like a Computer Scientist, which I reference below.
Drag and Drop Programming: A growing number of sites allow beginning programmers to build code by dragging and dropping “blocks” (or other visual widgets) rather than by manually writing text-based code. These do not necessarily use the Python language, but they are a place where beginners — including children — can go to get a feel for how to code. Among them are MIT Scratch, Code.org, and Blockly. There’s a blurred boundary between these types of sites and sites that teach via gamification.
Django: If you hang around the Python community for any length of time, Django will come up. It’s a Python-based Web framework, meaning that you can use it to write Web apps. I’ve read that the official Django tutorial is good and that Tango With Django is another useful resource. One book I’ve seen come up several times is Two Scoops of Django.
Exercism.io: Here’s how Wired described it: “Exercism is updated every day with programming exercises in a variety of different languages. First, you download these exercises using a special software client, and once you’ve completed one, you upload it back to the site, where other coders from around the world will give you feedback.” Exercism may be a sophisticated, crowd-sourced learning experience, but, at least for now, it requires you to use GitHub and command lines. In other words, it’s somewhat complicated to get off the ground with it. Still, if you’re beyond the early beginner stages, it may be a natural next step. Newcoder.io/ seems to be a similar site.
Exploratory Computing with Python: This is said to teach the “daily tasks of many scientists and engineers that try to solve problems.”
Instant Hacking: A super abbreviated tutorial designed to teach Python on the fly.
Intro to Computer Science: I’ve enjoyed working with this Udacity MOOC. As far as I can tell, the courseware is still free, but there is paid version that includes extras such as project feedback, personal guidance, personalized pacing support, and a verified certificate. There is also an Udacity course called Programming Foundations with Python.
Game-Based Learning: I’ve already mentioned Checkio, which is geared more toward adults, but there are other games as well that are even more “game-like” and sometimes geared toward younger audiences, including CodeCombat, Codingame, and Code.org. PythonChallenge is closer to Checkio but, instead of starting with pretty clear instructions about what goal you need to achieve, you have to interpret clues as you go along. I should note that some games (such as CodeCombat) are free to start but charge you something, such as a monthly subscription fee, once you’ve ascended to certain levels.
Google (and not just the search engine): The famous search engine is often the coder’s best friend. You put a question into the magic rectangle and it serves up lots of possible answers. Sometimes it fails to deliver anything good, but often it doesn’t. In fact, it usually offers up in one or more of the places on this list. But there are other good resources on Google, and one of my favorites is its Google+ communities. (Yeah, I know Facebook has pummeled Google in the social media area, but a lot of geeks seem to prefer Google+ communities). The one I frequent most is “Python: The Unofficial Python Community,” which is well populated and usually friendly to both experienced and neophyte coders. And then there’s Google’s Python Class, which has both text and video. It’s fun largely because it is delivered to Google employees in what I assume is a Googleplex classroom.
Hands-on Python Tutorial: This is actually a full university course taught by Dr. Andrew N. Harrington. I like it very much, having stumbled onto it via iTunes. Or, to be specific, iTunesU. If you’ve never investigated iTuneU, I’d recommend that you do.
jWork Learn: Contains two Python tutorials on general programming.
The Hitchhiker’s Guide to Python!: Bills itself as an “opinionated guide [that] exists to provide both novice and expert Python developers a best-practice handbook to the installation, configuration, and usage of Python on a daily basis.” Most of what I’ve read is not for rank beginners, but there seems to be a lot of canny advice. It also contains a good list of other Python resources.
How to Build a Python Bot That Can Play Web Games: This is based mostly on text and screenshots, and it entails building a Computer Vision-based game bot in Python.
How to Think Like a Computer Scientist: Various versions of this book exist, but my favorite is the interactive version to which I’ve linked here. In my experience, it is a fine blend of beginner book and online tutorial. I hope more computer “books” will follow this approach in the future.
Fluent Python: This book is not for the beginner but, rather, for experienced people who want to get better at writing idiomatic Python code.
Interactive Python: Also known as Runestone Interactive, this is nice collection of interactive books on coding. How to Think Like a Computer Scientist, which I mention above, is just the most well-known of its works. There are other books on both Python and Java, as well as the Everyday Python Blog. I’ve started working through Problem Solving Through Algorithms and Data Structures, which I’d say is more of an intermediate than beginner book/tutorial.
Introduction of Python’s Flask Framework: Like Django, Flask is a Web framework for Python but it is often billed as smaller and easier to learn. Therefore, it may be an appropriate starting place for beginning programmers who want to work on a Web framework.
Invent with Python: I’m a big fan of the book Invent Your Own Computer Games, which is geared toward kids but which is terrific for beginner programmers. There’s a free online version. It takes you through the process of code for specific games. He note only provides all the code but shows you how and why it works. There’s nothing else quite like it, in my experience. The author, Al Sweigart, has also authored Making Games with Python & Pygame and Hacking Secret Ciphers with Python, also available for free. Automate the Boring Stuff with Python has also been recommended to me.
Invent with Python Bookshelf: This is a very nicely laid out list of books, many of which can be gotten for free. Al Sweigart, the owner of the site, not only includes his own books but many others as well.
Learnpython: This is an interactive Python tutorial that has a set of tutorials that teach the basics as well as more advanced lessons. I’ve used it and liked it. It’s straightforward, fast and without many bells or whistles.
Learn Python The Hard Way: Based on my experience in online communities, a lot of people use and swear by this. I’ve gone through parts of it. Some people say they’ve done it in a weekend, but I know I couldn’t complete it that quickly. There’s a free book online and also a relatively inexpensive (last time I checked) course that includes videos, among other things.
MIT Open Courseware: Introduction to Computer Programming: I don’t know why, but I find this very relaxing to watch. There’s something very retro and human about this format in the age of well-designed MOOCs, as the professors in styleless shirts and black slacks slowly cover themselves in chalk dust, make the occasional mistake (corrected by their students), and deliver jokes that are often endearing just become they’re so lame. A version of this course runs in MOOC form sometimes on Edx.
Nettuts+’s Python from Scratch: This is a combination of text and video that demonstrates the “ins and outs of Python development,” starting from the most basic levels possible.
Non-Programmer’s Tutorial for Python 2.6: There’s nothing high-tech about this, but it’s a fine set of Wikibooks-based tutorials for beginners.
Non-Programmer’s Tutorial for Python 3: Not interactive but, as with the 2.6 version, a nice set of Wikibooks-based lessons on learning the basics.
One Day of IDLE Toying: A succinct introduction to IDLE, which stands for Integrated DeveLopment Environment. It’s the “integrated development environment” (that is, the doodad into which you write and run your programs) that’s bundled with Python, so you have it when you download the program.
Online Python Tutor: Free educational tool that allows a teacher or student to “write a Python program in the Web browser and visualize what the computer is doing step-by-step as it executes the program.” Pretty neat if you can’t quite visualize what’s happening in your code.
Programiz: I stumbled on this site while looking for information on keywords in Python. Not only does it have an excellent explanation of keywords, complete with sample code, but the other parts of the online tutorial also look very clean and helpful.
Primers on Python: There are surprisingly few good, short, introductory Python primers online. I recommend First Steps With Python as a less quirky alternative to this book. One (perhaps overly) succinct work is Patrice Koehl’s Python Primer. There’s also Crash into Python, although I think that’s geared toward people who know how to code but are new to Python. A Beginner’s Python Tutorial seems like a pretty nice tutorial for complete beginners, and I think After Hours Programming can also be a useful primer.
Programming for Everybody (Python): A University of Michigan MOOC from Coursera. You’ll need to register and login to see it. I’ve not taken this course. Last time I looked, there were a number of other Coursera offerings was well, such as An Introduction to Interactive Programming in Python and Algorithmic Thinking, all three from Rice University.
Pygame: A set of modules designed for writing games in Python.
Python 3 Programming Tutorial: This is a series of videos on Python programming on YouTube. Generally speaking, YouTube is an amazing source of knowledge about programming and software usage in general. I’m pretty sure I could spend weeks there just watching hundreds of Python-related videos.
Python3 Tutorial: An introduction into Python for beginners and intermediate learners
Python Books: From the official Python website, this is a list of books for both beginners and advanced practitioners. From what I can tell, it’s regularly updated (which is not always the case for other book lists). Here’s a much shorter list from a different source.
Python Course: By U.S. standards, this isn’t a course but, rather, an online tutorial that is almost all text and graphics. It has tutorials for both Python 2 and Python 3, and these tend to have pretty good explanations: or, at least, better than a lot of the official Python documentation, in my view.
Python for Beginners: From the official Python website, it has recommendations for installing, learning and otherwise investigating Python.
Python for Non-Programmers: From the official Python website, it has links to video tutorials, online courses, websites, books, and resources for younger students.
Python for You and Me: This simple but effective online book is written for programmers new to Python.
Python, Programming, Technology & Stuff: A list of various Python resources, including a collection of Python “Must Reads.”
Python Programming Tutorials: Pretty extensive list of video tutorials geared toward the 2.6 version of Python.
Python Turtle: I haven’t downloaded this but have used a version in a tutorial. It was fun. In essence, you write code to move your animated turtle in various ways. It “strives to provide the lowest-threshold way to learn (or teach) software development in the Python programming language.”
The Python Tutorial for 2.7.8 and the Python Tutorial for 3.4.1: These are from the official Python.org website. My experience is that these contain a ton of great information but are, at times, difficult to parse. I sometimes need to go to other tutorials that are easier to understand, but I often start here.
Python Weekly is a “free weekly newsletter featuring curated news, articles, new releases, jobs etc related to Python.” I receive it and enjoy it, but I find that it’s geared to more seasoned Python coders rather than to beginners.
Pythonic Perambulations is not a blog for beginners but it’s well-written and fun to read (even when I can’t quite grasp the details). Think of it as aspirational. When you start to really grok this blog, you’re past the beginner phase.
StackOverflow: If you do a Google search to find out how you do something in Python, you’ll likely be directed to this website, which is where both beginners and experts go to ask questions and have those questions answered by various Python programmers. It’s invaluable. Because this has been going on a while, your question has usually already been asked and answered here, so do a search before asking anything.
Stupid Python Ideas: I’m only beginning to be able to parse a blog like this one, which goes into detail on more sophisticated Python coding concepts and practices. This blog strikes me as one of the clearer ones. It has helped me, for example, understand how the function called grouper works. I just couldn’t understand the official documentation on it.
Test-Driven Development with Python: As you progress, you may become interested in learning how to better test your code. This book is available free online.
Transforming code into Beautiful, Idiomatic Python by Raymond Hettinger: This is the deck from a speaker presentation.
TryPython: This is another interactive tutorial for the Python 2 versions (specifically Iron Python 2.6.1). As of this writing, I’ve not used it. As I recall, I didn’t want to download Microsoft Silverlight, which is required to make it operate.
Tutorials Point: When I’m searching Google to find out how to do something in Python, I often wind up here, especially if I can’t understand the official Python documentation (a not uncommon occurrence for me). The explanations here tend to be written in clear English and the examples are usually helpful. You can also move through the tutorial in a systematic way if you like.
Twitter accounts: There are four that seem particularly worth following to me: @ThePSF @planetpython @pythoncoders @gvanrossum. I’m always interested in following other accounts if you have any recommendations.
BY MARK VICKERS