Functions
BUILT-IN FUNCTIONS
e Python interpreter supports many functions that are built-
built
sixty-eight, as of Python 3
Function Description
abs() Returns absolute value of a number
divmod() Returns quotient and remainder of integer division
ath
max() Returns the largest of the given arguments or items in
an iterable
min() Returns the smallest of the given arguments or items in
an iterable
pow() Raises a number to a power
round() Rounds a floating
floating-point value
sum() Sums the items of an iterable
ype Conversion
Function Description
ascii() Returns a string containing a printable representation of an
object
bin() Converts an integer to a binary string
bool() Converts an argument to a Boolean value
chr() Returns string representation of character given by integer
argument
complex() Returns a complex number constructed from arguments
float() Returns a floating-point
point object constructed from a number or
string
hex() Converts an integer to a hexadecimal string
int() Returns an integer object constructed from a number or
string
oct() Converts an integer to an octal string
ord() Returns integer representation of a character
repr() Returns a string containing a printable representation of an
object
str() Returns a string version of an object
type() Returns the type of an object or creates a new type object
Input/Output
Function Description
format() Converts a value to a
formatted representation
input() Reads input from the console
open() Opens a file and returns a file
object
print() Prints to a text stream or the
console