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