Python built-in functions are the ready-made tools such as print(), len(), sorted() and round() that come with the interpreter. You call them anywhere without an import, because Python loads them from the builtins module at startup:
prices = [19.99, 5.49, 120.00]
print(len(prices), max(prices), round(sum(prices), 2)) # 3 120.0 145.48
Before writing a word, I ran each snippet on Windows 11 under Python 3.12.5 (and checked the counts on Python 3.14.8), then pasted the Command Prompt output exactly as it appeared.
In this tutorial, we’ll see what a built-in is, how to list all of them, the main groups with short examples, a reference table and the mistakes that trip people up.
What are built-in functions in Python?
A built-in function is one Python defines for you, so it’s there the moment your script starts. You don’t import anything; the name is looked up in the builtins module after your own variables:
import builtins
print(len("Chicago"), builtins.len("Chicago"))
print(len is builtins.len)
print(type(len))
print(type(int))
Output:
7 7
True
<class 'builtin_function_or_method'>
<class 'type'>
Notice that int is a class, not a plain function. The same is true for str, list, dict and range; calling them builds a new object. Anything else you write with def is a user-defined function.
How do you list all built-in functions in Python?
Call dir() on the builtins module. It returns every name, including the exception classes, so filter for lowercase names that don’t start with an underscore:
import builtins
import textwrap
names = dir(builtins)
functions = [n for n in names if n.islower() and not n.startswith("_")]
errors = [n for n in names if n.endswith(("Error", "Exception", "Warning"))]
print("Names in builtins: ", len(names))
print("Lowercase public names:", len(functions))
print("Exceptions/warnings: ", len(errors))
print("Added by site:", [n for n in ("help", "exit", "quit", "copyright", "credits", "license") if n in functions])
print()
print(textwrap.fill(", ".join(functions), 92))
Output:
Names in builtins: 158
Lowercase public names: 75
Exceptions/warnings: 63
Added by site: ['help', 'exit', 'quit', 'copyright', 'credits', 'license']
abs, aiter, all, anext, any, ascii, bin, bool, breakpoint, bytearray, bytes, callable, chr,
classmethod, compile, complex, copyright, credits, delattr, dict, dir, divmod, enumerate,
eval, exec, exit, filter, float, format, frozenset, getattr, globals, hasattr, hash, help,
hex, id, input, int, isinstance, issubclass, iter, len, license, list, locals, map, max,
memoryview, min, next, object, oct, open, ord, pow, print, property, quit, range, repr,
reversed, round, set, setattr, slice, sorted, staticmethod, str, sum, super, tuple, type,
vars, zip

dir(builtins) returns 158 names, and the lowercase filter leaves 75 public names, printed as one wrapped list.On Python 3.12.5 that’s 158 names in total and 75 lowercase ones. Python 3.14.8 reports 160 names but the same 75. Six of them (help, exit, quit, copyright, credits, license) come from the site module.
When I started Python 3.14.8 with -S (no site), the count dropped to 69. The official 3.14 table lists 71 functions, because it also counts help() and __import__(). You’ll find more on the dir() function and dir() vs vars().
Math built-in functions: abs(), round(), sum(), min(), max(), pow()
These cover most everyday number work without importing math. Here they run on a small list of order prices in USD:
prices = [19.99, 5.49, 120.00, 64.50, 3.75]
refund = -42.10
print("abs: ", abs(refund))
print("sum: ", sum(prices), "| 0.1 + 0.2 =", sum([0.1, 0.2]))
print("min/max: ", min(prices), max(prices))
print("round: ", round(64.4999, 2), round(2.675, 2))
print("halves: ", round(0.5), round(1.5), round(2.5))
print("pow: ", round(pow(1.05, 3), 4), pow(2, 10, 1000))
print("divmod: ", divmod(125, 12))
print(f"sales tax: ${sum(prices) * 0.0825:.2f}")
Output:
abs: 42.1
sum: 213.73 | 0.1 + 0.2 = 0.30000000000000004
min/max: 3.75 120.0
round: 64.5 2.67
halves: 0 2 2
pow: 1.1576 24
divmod: (10, 5)
sales tax: $17.63

sum() shows float noise, and the halves line shows round-half-to-even.Two results surprise people. round(2.675, 2) gives 2.67 because 2.675 can’t be stored exactly as a float, and round(2.5) is 2 because Python rounds halves to the even number. See the round() function in Python.
abs() drops the sign, as covered in Python absolute value. divmod(125, 12) returns quotient and remainder together, so 125 months is 10 years and 5 months.
For totals, read the sum() function in Python. min() and max() also take a key, explained in finding the maximum value with max().
pow(2, 10, 1000) adds a fast modulo as the third argument; see the pow() method in Python.
Type conversion built-ins: int(), float(), str(), bool(), type()
Form fields, CSV columns and API values usually arrive as strings. These built-ins convert them and check what you’ve got:
raw = {"zip": "02134", "qty": "3", "price": "19.99", "member": ""}
qty = int(raw["qty"])
price = float(raw["price"])
print(qty * price, type(qty * price))
print(str(qty) + " items", bool(raw["member"]), bool("no"))
print(int(raw["zip"]), "<- the leading zero is gone")
print(list("USA"), tuple([1, 2]), sorted(set(["NY", "CA", "NY"])))
print(dict(state="TX", city="Austin"))
print(isinstance(price, (int, float)), type(raw) is dict)
try:
int(raw["price"])
except ValueError as err:
print("ValueError:", err)
Output:
59.97 <class 'float'>
3 items False True
2134 <- the leading zero is gone
['U', 'S', 'A'] (1, 2) ['CA', 'NY']
{'state': 'TX', 'city': 'Austin'}
True True
ValueError: invalid literal for int() with base 10: '19.99'
Converting a ZIP code with int() silently drops its leading zero, so keep ZIP codes as strings. int("19.99") raises a ValueError; convert with float() first.
Empty strings, 0, None and empty containers are falsy, which is why bool("") is False and bool("no") is True. The rules are in the bool() function in Python.
Prefer isinstance() over comparing type(), since it accepts a tuple of types and respects subclasses. Compare both in checking the type of a variable and isinstance() and issubclass() examples.
I’ve used sorted(set(...)) here because a set has no fixed order. Keyword arguments to dict() build a dictionary quickly, as shown in the dict() function in Python.
Iteration built-ins: len(), range(), enumerate(), zip(), sorted()
This group powers almost every loop you’ll write. Here they work on a list of US states and their capitals:
states = ["Texas", "Ohio", "California", "Iowa"]
capitals = ["Austin", "Columbus", "Sacramento", "Des Moines"]
print(len(states), list(range(1, 10, 3)))
for i, (state, capital) in enumerate(zip(states, capitals), start=1):
print(i, state, "->", capital)
print(sorted(states))
print(sorted(states, key=len, reverse=True))
print(list(reversed(states)))
it = iter(states)
print(next(it), next(it), next(it, "done"))
Output:
4 [1, 4, 7]
1 Texas -> Austin
2 Ohio -> Columbus
3 California -> Sacramento
4 Iowa -> Des Moines
['California', 'Iowa', 'Ohio', 'Texas']
['California', 'Texas', 'Ohio', 'Iowa']
['Iowa', 'California', 'Ohio', 'Texas']
Texas Ohio California

enumerate() and zip() number the state and capital pairs, then sorted() orders them alphabetically and by length.len() works on any sized object, explained in the len() function in Python. range(1, 10, 3) stops before 10, which for i in range() in Python walks through.
enumerate(..., start=1) gives you a counter without managing one; see enumerate() in Python. zip() stops at the shortest input, covered in the zip() function in Python.
sorted() returns a new list and accepts key and reverse; sorting a list alphabetically goes deeper. next(it, "done") returns the default instead of raising StopIteration when an iterator runs dry.
Functional built-ins: map(), filter(), any() and all()
These take a function or a condition and apply it across an iterable. I use them for quick transforms and yes/no checks on a list of order totals:
orders = [128.40, 42.75, 310.00, 0.00, 89.99]
taxed = map(lambda x: round(x * 1.0825, 2), orders)
print(type(taxed).__name__)
print(list(taxed))
print(list(taxed), "<- a map object runs only once")
print(list(filter(None, orders)))
print(list(filter(lambda x: x > 100, orders)))
print(any(x > 300 for x in orders), all(x > 0 for x in orders))
print(any([]), all([]))
Output:
map
[138.99, 46.28, 335.57, 0.0, 97.41]
[] <- a map object runs only once
[128.4, 42.75, 310.0, 89.99]
[128.4, 310.0]
True False
False True

list(taxed) comes back empty because a map object is consumed once, and filter(None, ...) drops the 0.0 total.Both map() and filter() return lazy iterators. You’ll find the details in the map() function in Python and ways to filter lists in Python.
Watch the last line: any([]) is False but all([]) is True. See the any() function and the all() function for how they short-circuit.
reduce() isn’t a built-in anymore. It moved to functools in Python 3, as explained in the reduce() function in Python.