Created by Zed A. Shaw Updated about 18 hours

Learn Python the Hard Way, 5th Edition (2023-2024)

Yes, it's Python 3! Full Release Date Feb 1, 2024 The latest version of Learn Python the Hard Way teaches you the basics of computer programming from nothing, but focusing on the tools Data Scientists use. Data Science is the most popular way Python is used today, and the tools Data Scientists use are very friendly to beginners. This course will assume you know nothing, so even if you don't want to do Data Science this course will get you on the right path with Python.

UPDATE: All exercises are written and should work. Official release date of the book from Pearson will be Feb, 2024. Videos will be published from Jan 15, 2024 onward. If you find errors let me know at help@learncodethehardway.com.

Course Contents

This course contains the following modules and lessons. Every course offers free samples of the first 10 lessons so you can decide if you want to take the course, and excerpts from all lessons after that.

Module Getting Started in Python

The best course to learn Python.

Module The Basics of Programming

Learning the basic programming concepts.
  • 18: Names, Variables, Code, Functions
    Big title, right? I am about to introduce you to the function! Dum dum dah! Every programmer will go on and on about functions and all the different ideas about how they work and what they do, but I will give you the simplest explanation you can use right now.
  • 19: Functions and Variables
    You're now going to combine functions with what you know of variables from previous exercises.
  • 20: Functions and Files
    Remember your checklist for functions, then do this exercise paying close attention to how functions and files can work together to make useful stuff.
  • 21: Functions Can Return Something
    You have been using the = character to name variables and set them to numbers or strings.
  • 22: Strings, Bytes, and Character Encodings
    To do this exercise you'll need to download a text file that I've written named `languages.
  • 23: Introductory Lists
    Most programming languages have some way to store data inside the computer.
  • 24: Introductory Dictionaries
    In this exercise we'll use the same data from the previous exercise on lists and use it to learn about Dictionaries or dicts.
  • 25: Dictionaries and Functions
    In this exercise we're going to do something fun by combining functions with dicts.
  • 26: Dictionaries and Modules
    In this exercise you're going to explore how the dict works with modules.
  • 27: The 5 Simple Rules to the Game of Code
    This exercise is intended to be studied periodically while you study the next exercises.
  • 28: Memorizing Logic
    Today is the day you start learning about logic.
  • 29: Boolean Practice
    The logic combinations you learned from the last exercise are called "Boolean" logic expressions.
  • 30: What If
    Here is the next script of Python you will enter, which introduces you to the if-statement.
  • 31: Else and If
    In the last exercise you worked out some if-statements and then tried to guess what they are and how they work.
  • 32: Making Decisions
    In the first half of this book you mostly just printed out things called functions, but everything was basically in a straight line.
  • 33: Loops and Lists
    You should now be able to do some programs that are much more interesting.
  • 34: While Loops
    Now to totally blow your mind with a new loop, the while-loop.
  • 35: Branches and Functions
    You have learned if-statements, functions, and lists.
  • 36: Designing and Debugging
    Now that you know if-statements, I'm going to give you some rules for for-loops and while-loops that will keep you out of trouble.
  • 37: Symbol Review
    It's time to review the symbols and Python words you know and to try to pick up a few more for the next few lessons.

Module Applying What You Know

Getting started in semi-advanced topics

Module Python and Data Science

Learning the early tools a data scientist will use in their work.