Python Learning Guide

Learn Python, one step at a time.

Short lessons that make you think: predict the output, fix the bug, put the code in order. Then practise with algorithms, design patterns and the questions interviewers really ask.

For Android. Free to start, with an optional one-time Pro upgrade. No ads, no subscription.

No ads
first_steps.py
In [1]:
print("Hello, Python!")
Hello, Python!
In [2]:
[n * n for n in range(5)]
Out[2]: [0, 1, 4, 9, 16]
In [3]:
"learn python".title()
Out[3]: 'Learn Python'
In [4]:
sorted({"pears": 3, "apples": 5})
Out[4]: ['apples', 'pears']
Works offline
  • Free to startPro is a one-time purchase
  • No adsAnd no subscription
  • Works offlineEverything is in the app
  • No accountYour progress stays on your phone

>>> lesson.try_it()

One lesson, every kind of question

This is how lessons work in the app: a short read, then one of each kind of question. Check your answer, and if it's wrong you get one more try before the explanation.

>>> interview.prep()

Walk into the interview ready

199 questions interviewers really ask, from junior to senior roles. Every one has a clear answer and a code example. Here are six from the app, try them:

>>> path.sections()

From your first print to testing and debugging

Sections that build on each other, from the basics to modern Python. Your progress, a daily streak, your own avatar and badges keep you coming back.

print() if for def class assert 7 days
  1. Introduction to Python
  2. Anatomy of a Python Program
  3. Variables and Data Types
  4. Operators and Expressions
  5. Strings
  6. Control Flow
  7. Functions
  8. Lists and Tuples
  9. Dictionaries and Sets
  10. Error Handling
  11. File I/O
  12. OOP: Classes and Objects
  13. Inheritance and Polymorphism
  14. Modules and Packages
  15. Functional Programming Tools
  16. Iterators and Generators
  17. Concurrency and Parallelism
  18. Type Hints and Modern Python
  19. Testing and Debugging

>>> lesson.questions

Learn by doing

Every lesson asks something of you, so it sticks.

In [ ]: In [*]: In [1]: print("Hello, Python!") Hello, Python! 2 ** 3 = 8
# one idea at a time
x = 10   # a name for a value

Read a little

Short lessons with code you can follow, one idea at a time.

print(2 ** 3)   # what comes out?

Predict the output

Read the code the way Python would, then say what it prints.

for n in nums:
    total = n   # spot the bug

Find the bug

One line is wrong. Find it, and learn the mistake before it costs you an afternoon.

for ___ in range(3):
    print(___)

Fill the gaps

Pick the right words to finish the code.

    return x * 2
def double(x):

Put lines in order

The lines are scrambled. Put them back so the code works.

# type of (1, 2)?
# list, tuple or set

Choose the answer

A straight question with one clear answer.

>>> app.tour()

Take a look inside

Pick a part of the app to see it.

The learning path with completed Python sections

>>> help(plan)

Start free, pay once

Start for free. Pro unlocks the full curriculum and everything else in the app, for a single payment that's yours to keep. No ads, and no subscription.

>>> plan = {"start": "free", "pro": "one-time", "ads": 0}
>>> plan["ads"]
0
>>> plan["subscription"]
KeyError: 'subscription'

>>> import cpp

Learning C++ too?

The C++ Learning Guide works the same way, with its own lessons, challenges and interview questions.