Flashcards › Math & Programming
Math & Programming

Free Python Basics Flashcards

Python’s core operations are small enough to memorize completely — and doing so keeps you in flow instead of in the docs. These are the expressions working Python developers use daily.

Study these 10 starter cards

FlashcardsLearn mascot
QUESTION
Tap the card to reveal the answer
QPython: how do you get the length of a list?
Alen(my_list)
QPython: merge two dictionaries (3.9+)?
Amerged = d1 | d2
QPython: what does a list comprehension look like?
A[x * 2 for x in items if x > 0]
QPython: how do you open a file safely?
Awith open("file.txt") as f: — auto-closes on exit
QPython: remove duplicates from a list (order not needed)?
Alist(set(my_list))
QPython: what is the danger of a mutable default argument?
AIt is shared across all calls — use None and create inside the function
QPython: iterate with index and value?
Afor i, value in enumerate(items):
QPython: f-string syntax?
Af"Hello {name}, you are {age}"
QPython: difference between a list and a tuple?
ALists are mutable; tuples are immutable
QPython: how do you handle exceptions?
Atry: ... except SomeError as e: ... (optionally finally:)

Turn these into lasting memory

Reading answers is recognition — remembering them next month takes spaced repetition. Keep this deck and we'll bring every card back at the right moment.

Keep these 10 cards — free →

How to study python basics with flashcards

Related flashcard topics

TypeScript BasicsReact BasicsRegex BasicsComputer Science TermsExcel Shortcuts & FunctionsMultiplication Tables

Got your own notes?

Paste any list — notes, a spreadsheet, an Anki or Quizlet export — and you're studying it in about twenty seconds. No account needed to start.

Paste your notes →