5 approaches to learning Python

Whatever your learning style, there’s a resource for learning Python designed just for you. Here are five popular options.
1033 readers like this
1033 readers like this
Freer than free, opener than open: The fight for the learning management systems

Opensource.com

Python is a powerful, versatile programming language that's popular with open source software developers. Whether you're a seasoned developer looking to test your code, or you just want to learn the basics, the following resources might help.

1. Codecademy: The hands-on approach

Do you like a hands-on approach to learning? Try Codecademy. Codecademy courses include lessons, projects, and quizzes to help you learn Python and other coding languages. A free account grants access to interactive lessons and exercises, while a pro account also allows you to practice with quizzes and project challenges.

Each Codecademy lesson is completely interactive, and setup is painless. All the hard work—handling imports, packages, compiling, etc.—is done for you, so all you have to do is write the Python code. Lessons cover an array of topics in a variety of categories, including strings, functions, control flow, and loops.

Some users compare learning to program with Codecademy to learning to ride a bicycle with training wheels; however, when you’re a beginner, training wheels are essential. You may want to learn the simple syntax of a coding language before tackling complex topics like build processes and compilation.

2. Khan Academy: The lecture hall approach

Khan Academy is a video tutorial site with hundreds of videos on topics ranging from math to history to electrical engineering—and everything in between. If you prefer learning from lectures, this site might be great for you. Creating an account is free, but you don’t even need an account to watch videos on the site.

Khan Academy offers an “online class” feel, where an individual lectures in a series of videos. Each video describes one element of Python. You can then take the knowledge gained in each video and utilize it in your own code. For example, one video discusses for loops written in Python. For loops are a crucial control flow element used to specify iteration, so once you've learned about them, your Python code can greatly increase in complexity.

Unfortunately, when I was writing this article, the Khan Academy Python series was removed from the main website, but you can still find it on the Khan Academy YouTube channel.

3. Tutorialspoint: The textbook approach

Tutorialspoint is a gold mine of documentation, tutorials, and articles on any computer-related topic imaginable. (There are also resources for sports, monuments, and soft skills.) Essentially, if there is a computational topic you wish to learn, check Tutorialspoint. The website is free, requiring no login to view any of the content. If you prefer to learn by reading, this might be the best resource for you.

Tutorialspoint’s basic Python tutorial bypasses the training wheels placed by Codecademy and walks you through each step of setting up Python locally. After discussing installation and interpretation via command line, the tutorial progresses into the language itself. The first few pages cover basic syntax and variable types, but the advanced tutorial covers networking, XML processing, and multithreading.

Tutorialspoint is a great free resource for Python beginners as well as those who need a refresher or who want to learn about more complex topics.

4. GitHub: The exploratory approach

GitHub offers an exploratory approach to learning Python. This method may be best if you have experience in a coding language. GitHub is a centralized repository that anyone can use to house and maintain code, and it contains a plethora of Python projects that are available for exploration. Learning Python via GitHub would involve independent examination of existing Python projects.

From a simple search on the main page of GitHub, I found thousands of Python projects, ranging in skill level from beginner to expert. Some of these projects were specifically designed as examples for users interested in learning Python. Others were real projects written in Python, allowing for close inspection of real-world examples.

Two education-based projects belong to GitHub users Adaptives and Keon. The first of these two projects contains files showing simple examples such as defining different data types and raising exceptions. The second project is more advanced, providing Python implementations of many popular algorithms, such as the knapsack problem and different sorting algorithms.

Not all projects on GitHub are code-based. This constantly evolving guide provides a comprehensive overview of many Python concepts, from installation to debugging to writing documentation.

5. Python Tutor: The inspective approach

Python Tutor is a unique addition to this list. Once you have the basics of Python under your belt, this tool enables you to step through your code, line by line, to inspect variable values every step of the way. This is helpful for debugging, understanding how algorithms run from start to end, and preventing the perpetuation of incorrectly returning code. Once you’ve used the resources above, try out Python Tutor to better visualize the code you’ve written.

If you know of other online resources for learning Python, let us know in the comments below.

Sophie is a senior at Duke University studying computer science. She has just started to venture into the open source community via the course "Open Source World" taught at Duke in the fall of 2017, and has developed an interest in exploring DevOps. She will be working as a Software Engineer following her graduation in the spring of 2018.

18 Comments

There's also the MacGyver approach: take bits of some example script and stick them into some other script. If it blows up, try to figure out why, or at least have it blow up in an interesting way.

Nice list. Datacamp is another good resource for Python...and R.

Great article. I shared it with my Python programming class this morning.

udemy isnt too shabby either

3 and 5's links are new to me even though the concepts aren't. Great article!!

"...Unfortunately, when I was writing this article, the Khan Academy Python series was removed from the main website, but you can still find it on the Khan Academy YouTube channel."

This extremely transitory nature is what I find disturbing about information "...on the internet". How long will it be until SOMEone decides that they're not getting enough 'dollar-return', and the YouTube information is removed forever?
Good article. Very well written. Not too late for you to learn the incalculable value of paper, and the ephemeral nature of what's put on the internet.
All the best...

I agree with you there! This is why I'm a strong believer in books, whether they're PDF's that you download and then print out (or not...maybe you just place them on a tablet and use it as a study tool?) or they're actual books you can purchase online from Barnes & Noble...or Amazon. The data on the internet may or may NOT survive the next year, (as evidenced by a LOT of channels on YouTube losing their "monetization" rights, thereby a lot of the creators are just leaving, because....aside from a die-hard open source evangelist....who is willing to work hard for free?) I have over 200 different PDF's and eBooks I've downloaded from the web. Most are books of things I want to accomplish (I'm WAY behind!...46 and JUST trying to start learning about programming?...uugghh!) But I have topics that range from MySQL/NoSQL/MariaDB...to Linux (RHCSA.....LPIC Certification guides)....to BASH Scripting...to Windows 10 Administration. I have yet to delve into the "Python For Dummies" book I have...will get to it after the "Linux Bible"!....but since my son is headed off to college?...I'll have a LOT more time for reading...experimenting...and learning all I can!)

In reply to by robertservice (not verified)

Great list Sophie.
Have been fighting to learn Python for a while now. Written the way it is, I feel a lot of positive energy to try. One more time

Another resource:
www.codewars.com: where you can train your coding skills with coding challenges. This website caters to a lot more languages as well.

There is always the source of all things python 3:
https://docs.python.org/3/

Also, would recommend Eclipse with PyDev as a way to write and debug to watch how running code behaves.

I can recommend the subreddit /r/learnpython if someone struggles with a problem and need some help.

Additionally, their wiki is a nice collection of sites to learn python and tools to work with:

https://www.reddit.com/r/learnpython/wiki/index

Nice list... useful.

Sophie,
Great article. I'm currently using "Lear Python...The Hard Way". You can use the free course, but is a little harder to interface with. You can buy the book, and it comes in 2.7 and 3.0 Python. It definitely follows a tutorial method. Author is Zed A. Shaw.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.