Python 3 - EdDoc

EdDoc: home/built-in_functions

built-in functions

An index of the most useful built-in functions available to Python programmers without the need to import any modules.

Index:

Section Description
bin() Used to convert an integer number to a binary string.
chr() Returns the unicode character when passed its index number. The opposite of ord()
eval() Returns an integer or float answer when passed a mathematical expression as a string.
float() Converts an integer or a number represented as a string to a float data-type.
help() Used in the Python shell, accesses the built-in help documentation.
hex() Converts an integer to a hexadecimal number (represented as a string).
input() Used to access user keyboard input.
int() Converts a float or an integer represented as a string into an integer data-type.
len() Return the length of (the number of items in) an object.
max() Returns the largest item in a container data-type or a list of variables.
min() Returns the smallest item in a container data-type or a list of variables.
open() Used to open an external file.
ord() Returns the index number of a unicode character. The opposite of chr()
pow() A function that effiiciently raises a number to a given power.
print() Prints to output to the Python shell.
range() Produces a sequence of numbers, used extensively with Python's for loops.
round() Used to round decimal numbers to a given number of decimal places.
[Note: sometimes produces unexpected results]
sorted() Returns a new sorted list from the items in container data-type.
str() Converts an integer or float into a string.
sum() Totals numbers in a container data-type which only contains integers and/or floats.
type() Returns the data-type of an object when passed an identifying name.