Python Built-in Functions Study Guide: 77 Flashcards from abs to zip
Memorize Python's built-in functions with 77 flashcards: all, divmod, iter, chr, compile, int bases, hash. Study them in families and fix the classic traps.

Studying. But it's also a video game. 🎮
Flashcards, quizzes and games that make you actually remember.
Posted by
Related reading
Learn Python OOP in German: 59 Flashcards on Klassen, Vererbung and Magische Methoden
Study Python OOP with German explanations: 59 real flashcards on Klassen, Vererbung, MRO, Kapselung and dunder methods, plus 4 cards to fix and überschreiben vs überladen.
Master Python OOP in Spanish: 59 Flashcards on Clases, Herencia and Métodos Mágicos
Learn Python object-oriented programming with Spanish explanations: 59 real flashcards on clases, herencia, MRO, métodos mágicos and the Spanish terms to know.
Learn Python OOP in French: 59 Flashcards on Classes, Héritage and Méthodes Magiques
Study Python object-oriented programming in French with deck EO1367: 59 flashcards on classes, self, super(), MRO, dunder methods, @property and metaclasses.
Python ships with a short list of functions you can call without importing anything, and knowing them cold is the difference between writing ten lines and writing one. Deck BX4173 – Python: Built-in Functions turns that list into 77 cards: one per function, plus a dozen gotcha cards on edge cases.
Study this deck: Python: Built-in Functions
1 / 10Abs()
Tap the card for the answer · swipe right if you knew it, left if not
Sample cards
| Front | Back |
|---|---|
| All() | True if all elements of the iterable are true (or if the iterable is empty) |
| Divmod() | A pair of numbers consisting of quotient and remainder when using integer division (a // b, a % b) |
| 2-argument form of iter() | iter(callable, sentinel) - calls callable until it returns sentinel, then raises StopIteration |
| Valid range for chr() | 0 through 1,114,111 (0x10FFFF in base 16) |
| Three modes for compile() | 'exec' (statements), 'eval' (single expression), 'single' (single interactive statement) |
| Is bool a subclass of int? | Yes, bool is a subclass of int. Its only instances are True and False |
| Can hash values for equal numbers differ? | No - numeric values that compare equal have the same hash value (e.g., 1 and 1.0) |
| What bases are allowed for int() conversion? | 0 and 2-36 (base 0 interprets like code literals: 0b, 0o, 0x prefixes) |
What you'll memorize
Numbers: abs, divmod, pow, round, sum, min, max, bin, oct, hex, int, float, complex. Iteration: iter, next, enumerate, zip, map, filter, reversed, sorted, range, len, any, all. Types and containers: bool, str, list, tuple, dict, set, frozenset, bytes, bytearray. Introspection: type, isinstance, issubclass, callable, id, hash, dir, vars, globals, locals, getattr, setattr, hasattr, delattr, help. Code execution: eval, exec, compile, breakpoint. Strings and I/O: chr, ord, ascii, repr, format, print, input, open. Classes: super, @classmethod, @staticmethod, @property.
Fix the casing first
Every front is capitalized (Abs(), Len(), Zip()). Python is case-sensitive, and Abs(-3) raises a NameError. Retype the fronts in lowercase before your first session, or your muscle memory will learn the wrong spelling.
Study in families, not alphabetically
The deck runs A to Z, which scatters functions that only make sense together. Review them as sets:
- Inverses: chr/ord, getattr/setattr/hasattr/delattr, bin/oct/hex vs int(s, base).
- Lazy, single-use iterators: map, filter, zip, reversed, enumerate return iterators you can consume once; sorted returns a new list. Pair this with card 77: zip and map stop at the shortest iterable, and since Python 3.10
zip(..., strict=True)raises a ValueError instead. - Empty-iterable traps:
all([])is True,any([])is False. - eval / exec / compile: one evaluates an expression, one runs statements and returns None, one builds the code object both can use. Never feed them user input (card 71).
Add the missing cards
Write one more card for round(), whose card doesn't mention banker's rounding: round(2.5) == 2 and round(0.5) == 0, because halves round to the nearest even number. The deck also skips a few built-ins from the official table: aiter(), anext(), memoryview(), object(), slice() and __import__(). Add them if you're preparing for an interview or a certification.
Related decks
The three decorators here (classmethod, staticmethod, property) get their full treatment in Advanced Python: decorators, descriptors, lambdas and exceptions, and the containers in Python data structures and comprehensions.
Open BX4173 – Python: Built-in Functions in the library on Flip It.
Ready to learn faster? 🚀
Join FLIP IT for free and turn studying into a game.