How to Learn the Python Basics
Python is the most popular first programming language for good reason — clean, readable syntax built on a small set of keywords. Learn the core keywords and built-in functions and you can read and write real Python. This deck drills the essentials.
There are 14 cards in the deck below. You can read through them, practise them right here with the flip-card player, and then save the deck to study properly with spaced repetition — the method that makes them stick for months, not minutes.
Why the Python basics is hard to memorize (and the fix)
Beginners confuse similar keywords (is it "elif" or "else if"?) and forget which are keywords vs built-in functions (print and len are functions, not keywords). Learning each with its job fixes it.
The fix is active recall plus spaced repetition. Instead of re-reading the list (which feels productive but barely works), you test yourself — pull each answer out of memory — and you review each card on a schedule that stretches over time. Every time you successfully recall a fact, the memory gets stronger and the next review is pushed further out. That's how you go from "I saw it once" to "I just know it."
The fastest way to learn the Python basics
- Break it into small batches. Learn the control-flow keywords first (if, elif, else, for, while), then function/class keywords (def, return, class), then the common built-ins (print, len, range).
- Test, don't re-read. Look at the question, say the answer out loud before flipping the card. The little struggle to recall is what builds the memory — a smooth re-read does almost nothing.
- Review on a schedule. Spaced repetition shows you each card right before you'd forget it. Get one right and it comes back in a few days, then a week, then a month. Miss one and it comes back sooner.
- Keep sessions short and daily. Five to ten minutes a day beats a two-hour cram every time. Consistency is the whole game.
One fact per card. Python uses indentation (whitespace) to define code blocks — not braces. Consistent indenting is required, not optional.
The full deck: the Python Basics
Here's every card in the set. Practise them above, or save the deck and let spaced repetition schedule your reviews automatically.
| Keyword / function | What it does |
|---|---|
| What does "def" do in Python? | Defines a function |
| What does "return" do? | Sends a value back from a function |
| What does "if" do? | Runs code only when a condition is true |
| What does "elif" mean? | "Else if" — checks another condition |
| What does "for" do? | Loops over a sequence (list, range, string) |
| What does "while" do? | Loops as long as a condition stays true |
| What does "import" do? | Brings in code from another module |
| What does "class" do? | Defines a new type of object |
| What does print() do? | Displays output to the screen |
| What does len() do? | Returns the length (number of items) |
| What does range() do? | Generates a sequence of numbers |
| What are Python's boolean values? | True and False |
| What is "None" in Python? | A special value meaning "no value" |
| How does Python define a code block? | By indentation (whitespace), not braces |
Save this deck and actually remember it
Create a free account, keep this 14-card deck, and we'll schedule every review at the perfect moment. First deck free forever — no credit card.
Study this deck free →FAQ: learning the Python basics
How long does it take to learn the Python basics?
Most people can lock in the Python basics within one to three weeks of short daily sessions. With spaced repetition doing 10–14 cards a day, you'll recognise them within days and recall them reliably within a couple of weeks.
What's the best way to memorize the Python basics?
Active recall plus spaced repetition. Test yourself instead of re-reading, and review on a schedule that spaces the cards out over time. Flashcards are built for exactly this — which is why the deck above is the fastest path.
Is this deck free?
Yes. You can practise all 14 cards on this page for free with no account. Sign up (also free) to save the deck and let spaced repetition schedule your reviews so it sticks long-term.