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()
Returns True if the specified object has the specified attribute (property/method)
hasattr()
Returns the hash value of a specified object
hash()
Executes the built-in help system
help()
Converts a number into a hexadecimal value
hex()
Returns the id of an object
id()
Allowing user input
input()
Returns an integer number
int()
Returns True if a specified object is an instance of a specified object
isinstance()
Returns True if a specified class is a subclass of a specified object
issubclass()
Returns an iterator object
iter()
Returns the length of an object
len()
Returns a list
list()
Returns an updated dictionary of the current local symbol table
locals()
Returns the specified iterator with the specified function applied to each item
map()
Returns the largest item in an iterable
max()
Returns a memory view object
memoryview()
Returns the smallest item in an iterable
min()
Returns the next item in an iterable
next()
Returns a new object
object()
Converts a number into an octal
oct()
Opens a file and returns a file object
open()
Convert an integer representing the Unicode of the specified character
ord()
Returns the value of x to the power of y
pow()
Prints to the standard output device
print()
Gets, sets, deletes a property
property()
Returns a sequence of numbers, starting from 0 and increments by 1 (by default)
range()
Returns a readable version of an object
repr()
Returns a reversed iterator
reversed()
Rounds a numbers
round()
Returns a new set object
set()
Sets an attribute (property/method) of an object
setattr()
Returns a slice object
slice()
Returns a sorted list
sorted()
Returns a string object
str()
Sums the items of an iterator
sum()
returns a tuple
tuple()
returns the type of an object
type()
Returns the __dict__ property of an object
vars()
Returns an iterator, from two or more iterators
zip()