Built-in Functions#

The Python interpreter has a number of functions and types built into it that are always available.

Function

Description

abs()

Return the absolute value of a number.

bool()

Return a Boolean value.

chr()

Return the string representing a character.

float()

Return a floating point number from a number or string.

input()

This function takes an input and converts it into a string.

int()

Return an integer object constructed from a number or string.

len()

Return the length (the number of items) of an object.

list()

Rather than being a function, list is a mutable sequence type.

max()

Return the largest item in an iterable.

min()

Return the smallest item in an iterable.

ord()

Return an integer representing the Unicode code point of a character.

pow()

Return base to the power exp.

print()

Print objects to the text stream file.

round()

Return number rounded to ndigits precision after the decimal point.

sorted()

Return a new sorted list from the items in iterable.

str()

Return a str version of object.

sum()

Sums start and the items of an iterable.

type()

Return the type of an object.