Python Built-in Functions

Common Python built-in functions: map, filter, zip, enumerate, sorted, isinstance with descriptions, categories, and usage examples.

  • JSON6,449 B
  • YAML4,085 B · −37%
  • TOON2,926 B · −55%

Python built-in functions grouped by purpose, from map and filter to zip, enumerate, sorted and isinstance, with the common everyday builtins added: len, range, sum, min, max, any, all, abs, round, reversed, type, getattr, hasattr, iter, next and others.

Use it when

  • You need the right built-in for a task and a one-line description.
  • You are teaching Python's core vocabulary.

Watch out for

  • Listed here are Python 3 built-ins; Python 2 differs (for example print and xrange).
  • The official documentation lists all built-ins; this dataset covers the most used.

The data

Functions

NameDescriptionCategory
mapApply function to every item of iterableFunctional
filterConstruct iterator from elements matching predicateFunctional
zipAggregate elements from multiple iterablesItertools
enumerateReturn enumerated object yielding pairsItertools
sortedReturn new sorted list from iterableSorting
isinstanceCheck if object is instance of classType Checking
lenReturn the number of items in a containerSequences
rangeImmutable sequence of integers, commonly used in for loopsIteration
printWrite objects to the standard output or a fileI/O
inputRead a line of text from standard inputI/O
openOpen a file and return a file objectI/O
sumAdd the items of an iterable and return the totalNumeric
minReturn the smallest item of an iterable or among argumentsNumeric
maxReturn the largest item of an iterable or among argumentsNumeric
absReturn the absolute value of a numberNumeric
roundRound a number to a given number of digitsNumeric
anyTrue if any element of the iterable is truthyFunctional
allTrue if all elements of the iterable are truthyFunctional
reversedReturn a reverse iterator over a sequenceIteration
typeReturn the type of an object or create a new classType Checking
getattrGet the value of a named attribute of an objectIntrospection
hasattrTrue if the object has the given attributeIntrospection
iterReturn an iterator for an objectIteration
nextRetrieve the next item from an iteratorIteration

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
functionsnamestringmap
functionsdescriptionstringApply function to every item of iterable
functionscategorystringFunctional

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.com/api/dataset/python-builtins?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/python-builtins.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • python
  • reference
  • builtins

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets