How to Learn Python

I've taught several people the basics of coding throughout the years. If Python is the language you should learn first (rather than, say, JavaScript), do this:

  1. Read Learn Python the Hard Way and go through at least the first ~half of the exercises in order to learn the basics of Python.

  2. In general, the most important thing you can do when learning how to code is project-based learning. Come up with ideas for simple things to build, and build them! Or get project ideas from other people.


  • Create a basic number guessing game command line script
    • Randomly generates a number between 1 and 100
    • Accepts a guess from the user via stdin
    • Tell the user whether their guess is too low or too high
    • When they guess correctly, say so and exit
  • Write a simple flask app
  • Scrape a website (using requests) and extract useful data from it using BeautifulSoup