How to learn Python

Learning Python means installing it, working through the basics in order, typing and running every example yourself, and building small programs as soon as you can. It is free, and four habits matter most:

A dark computer screen filled with syntax-highlighted Python source code
A Python file in a dark editor, with line numbers down the left side.Photo: suixin390 / Pixabay
  1. 1

    Start with the basics

    Variables, strings, lists, if, for and functions, in that order.

  2. 2

    Type every example

    Run it, change it, and watch what breaks.

  3. 3

    Read the error

    The last line says what went wrong and where to look.

  4. 4

    Build small things

    A tip calculator is a small first project.

Learn in Evernote. Clip the docs, let the AI Assistant fix your code, and search any snippet.

Start your Python notebook in Evernote

How to learn Python in 8 steps

  1. 1

    Install Python 3

    Download the latest version from python.org: Python 3.15.2 was released on October 25, 2026. Python.org notes that many Linux and UNIX distributions include a recent Python, and some Windows computers come with it installed.

  2. 2

    Use a simple editor

    Python's IDLE is its own editor and interactive shell. The Python docs describe IDLE as Python's Integrated Development and Learning Environment, with colorized code and error messages.

  3. 3

    Learn the basics in order

    Numbers and variables, text (strings), lists, then if statements, for loops and functions. That is the order of the official Python Tutorial, chapters 3 and 4.

  4. 4

    Type and run every example

    Do not copy and paste. Type each example into the shell, run it, then change one thing and predict what will happen before you press Enter.

  5. 5

    Read error messages from the bottom

    The last line of a Python error names what happened, like NameError or TypeError, and the lines above show where. Fix the first error, run again, repeat.

  6. 6

    Build a small program each week

    A tip calculator, a number-guessing game, a to-do list that saves to a file.

  7. 7

    Learn data structures and modules

    Next come tuples, sets and dictionaries (chapter 5 of the tutorial), then modules and the standard library that comes with Python.

  8. 8

    Practice a little every day

    Pick a fixed time each day and keep one practice log. Each session starts from where you stopped, and your notes hold every error you hit and how you fixed it.

A 6-week Python plan for beginners

About 30 minutes a day, following the official Python Tutorial
  1. 3Week 1Numbers, variables and strings. Use Python as a calculator; print your name 10 times.
  2. 4Week 2Lists, if statements and for loops. Type every example in chapters 3 and 4.
  3. 5Week 3Functions. Break your code on purpose and read each error message.
  4. 6Week 4Project: a tip calculator that asks for the bill and the number of people.
  5. 7Week 5Dictionaries, sets and tuples. Store a small address book in a dictionary.
  6. Week 6Modules and files. Save the address book to a file and read it back.

Free ways to learn Python

All of these cost nothing. Pick one main course and stick with it, then use the others to fill gaps.

ResourceFromGood forFormat
The Python TutorialPython docsSome prior programmingWritten chapters
Python for Beginnerspython.orgInstallers and linksStarting page
CS50PHarvard, OpenCourseWareComplete beginnersTen weeks, final project
IDLEPython's own editorTrying code line by lineEditor and interactive shell

From python.org, docs.python.org and cs50.harvard.edu. CS50P is free through OpenCourseWare; a verified certificate is available through edX.

Free coding practice log

One entry per session. Copy it, or save it to your Evernote account and keep your snippets in the same note.

Date: [day] · Time spent: [minutes]

Topic: [one concept, like for loops or functions]

Source: [tutorial, chapter or video, with its link]

What I built: [a small program, in one line]

Error I hit: [the last line of the error message]

How I fixed it: [one sentence, plus the corrected snippet]

Next session: [the next concept to learn]

Trusted by Millions Worldwide

4.4

2,100+ reviews on G2

4.4

8,200+ reviews on Capterra

4.4

73,000+ reviews on App Store

248M

Registered users

Python learning questions

How long does it take to learn Python?

Harvard's free CS50P course covers the core of the language in ten weeks of material plus a final project. How long it takes you depends on your schedule.

Can I learn Python for free?

Yes. Python itself is free, and so are the official Python Tutorial on docs.python.org and Harvard's CS50 Introduction to Programming with Python, which you can take through OpenCourseWare.

Is Python good for beginners?

Yes. Python.org describes it as easy for beginners to use and learn. Harvard's CS50P is designed for students with or without prior programming experience.

What should I learn first in Python?

Variables and numbers, strings, lists, if statements, for loops and functions. After that, dictionaries, modules and working with files.

Do I need to be good at math to learn Python?

No. Python itself is about storing values, making decisions and repeating steps. Math matters when you work on math-heavy fields such as data science and machine learning.

Is the official Python Tutorial good for complete beginners?

It says itself that it is written for people new to Python, not new to programming. If you have never coded, start with a beginner course such as CS50P and use the tutorial as a reference.

What can I build with Python as a beginner?

A tip calculator, a number-guessing game, a quiz, a to-do list that saves to a file, or a script that renames a folder of photos. Pick something you would use yourself.

How do I read a Python error message?

Start at the bottom. The last line names the type of error and what happened, such as "NameError: name 'spam' is not defined". The lines above it show the file and line number where it happened.

How to learn Python with Evernote

Keep one notebook for Python: the pages you clip, your practice code in code blocks, and every error you fixed.

  1. 1

    Clip chapter 4.

    Save the for loops chapter with the Web Clipper into a notebook called Learning Python. The clip keeps its link, and its code samples keep their colors.

  2. 2

    Ask why the loop fails.

    Put your code and its IndexError in a note, then ask the AI Assistant why the loop goes past the end. It explains the error and fixes the code block in place.

  3. 3

    Find enumerate again.

    Search for "enumerate" when you forget how it works. Evernote searches your clips and practice notes, code blocks included, and opens the note at the match.

  • You can also ask the Assistant for a practice task that repeats every day.
  • You can also ask the AI Assistant to quiz you on a chapter you clipped, one question at a time.
  • You can also save screenshots of error messages, and search finds the words in them.

Every snippet, error and fix in one place

Clip the docs you learn from, ask the AI Assistant why your code breaks, and find any snippet again by searching for it.

Start for free