Learn Python
>>> modules_packages.builtin_functions

Built-in Functions in Python

#concept

Python includes a set of built-in functions — like print(), len(), range(), and dozens more — that are always available everywhere, with no import required at all. They cover the most common, everyday operations: measuring, converting, iterating, and inspecting values.

#how it works
1

Always available, no import needed

Unlike functions from a module, built-ins require no setup at all.

2

len(obj) measures size

Returns the number of items in a string, list, dictionary, or similar collection.

3

type(obj) and isinstance(obj, type)

Reveal or check an object’s type.

4

sorted(), min(), max(), sum()

Cover common operations on a collection, all built in.

5

help(obj) and dir(obj) aid exploration

Show an object's documentation, or list everything available on it.

#example
numbers = [4, 1, 7, 3]
 
print(len(numbers))
print(sorted(numbers))
print(min(numbers), max(numbers))
print(sum(numbers))
print(isinstance(numbers, list))
Output
4
[1, 3, 4, 7]
1 7
15
True
1len(numbers) counts the items in the list, returning 4.
2sorted(numbers) returns a brand new, sorted list, leaving the original unchanged.
3min(numbers) and max(numbers) find the smallest and largest values directly.
4sum(numbers) adds every item together.
5isinstance(numbers, list) confirms numbers really is a list, returning True.
#use cases
Reaching for a built-in first before writing custom code or importing a module, since built-ins cover most everyday needs
Quickly measuring, summing, or sorting a collection without any setup
Checking a value's type safely with isinstance() before an operation that assumes a specific type
Exploring an unfamiliar object interactively with dir() and help(), especially useful in the REPL

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books

Practice what you learned

Re-implement each visualized algorithm in Python yourself — building beats watching.