Built-in Functions Flashcards
Returns the absolute value of a number
abs()
Returns True if all items in an iterable object are true
all()
Returns True if any item in an iterable object is true
any()
Returns a readable version of an object. Replaces none-ascii characters with escape character
ascii()
Returns the binary version of a number
bin()
Returns the boolean value of the specified object
bool()
Returns an array of bytes
bytearray()
Returns a bytes object
bytes()
Returns True if the specified object is callable, otherwise False
callable()
Returns a character from the specified Unicode code.
chr()
Converts a method into a class method
classmethod()
Returns the specified source as an object, ready to be executed
compile()
Returns a complex number
complex()
Deletes the specified attribute (property or method) from the specified object
delattr()
Returns a dictionary (Array)
dict()
Returns a list of the specified object’s properties and methods
dir()
Returns the quotient and the remainder when argument1 is divided by argument2
divmod()
Takes a collection (e.g. a tuple) and returns it as an enumerate object
enumerate()
Evaluates and executes an expression
eval()
Executes the specified code (or object)
exec()
Use a filter function to exclude items in an iterable object
filter()
Returns a floating point number
float()
Formats a specified value
format()
Returns a frozenset object
frozenset()
Returns the value of the specified attribute (property or method)
getattr()
Returns the current global symbol table as a dictionary
globals()