Skip to main content
Mentr by PaprlybyPaprly
Student Guides

How to Learn Python for Beginners, Step by Step

A beginner order for Python: print, variables, input, if, logic, loops, strings, lists, functions, then one project. Ten free lessons you can run in the browser.

Mentr Editorial Team8 min read

Learn Python for beginners by writing one small idea, running it, and only then moving on. Start with print(), then names for values, then questions, decisions, repetition, text, lists and your own functions. That is the order of the free 10-lesson course at mentr.in/learnpython.

The order that keeps beginners unstuck

Skipping ahead is why people say Python is confusing. A loop is easy after you can print and name a value. A function is easy after you have written the same lines three times. Follow this order.

Beginner path, lesson by lesson
LessonYou can do this after it
1. Welcome to Pythonprint() a few lines, in order, with quotes around text
2. VariablesStore a name or a number and use it again
3. Input and calculationsAsk with input() and do arithmetic
4. Making decisions with ifChoose with if, elif and else
5. Thinking with logicCombine tests with and, or and not
6. LoopsRepeat with for and while, including range()
7. StringsClean and change text
8. ListsKeep many values and loop over them
9. FunctionsName a block of code and return a result
10. Final ChallengeBuild a whole program from those pieces

How to study one lesson

  1. Read the study notes until the idea has a name you can say out loud.
  2. Run the example. If it asks for input(), type the answer in the console and press Enter.
  3. Predict the next snippet before you run it. A wrong guess is useful.
  4. Do the practice. Fix the bug questions on purpose: the error message is the lesson.
  5. Only then open the next lesson.

A first program looks like this. Quotes make the words text. The two print lines run from top to bottom.

print("Hello")
name = "Ada"
print(name)

Three habits that beat a long playlist

  • Type the code. Watching a video of print() does not teach your fingers.
  • Read the error. SyntaxError, NameError and IndentationError each point at a different mistake.
  • Stop while it is still easy. Ten minutes on one idea sticks better than an hour of five ideas.

Common questions

How should a complete beginner learn Python?
Go in order: print, variables, input, if, logic, loops, strings, lists, functions, then one project. Run every example. The free course at mentr.in/learnpython is built in that order.
What should my first Python program be?
A few print() lines. Then a program that stores your name in a variable and prints it.
How many lessons are in the beginner course?
Ten. Nine teach one idea each. Lesson 10 is the Final Challenge, where you build a program.