1/70
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
abs()
returns the absolute value of a number
aiter()
returns an asynchronous iterator from an async iterable
all()
returns True if all elements of an iterable are true
anext()
returns the next item from an async iterator
any()
returns True if at least one element of an iterable is true
ascii()
returns a readable version of an object (escapes non-ASCII chars)
bin()
converts a number to a binary string
bool()
converts a value to True or False
breakpoint()
drops into debugger at the calling point
bytearray()
creates a mutable sequence of bytes
bytes()
creates an immutable sequence of bytes
callable()
checks if the object is callable (like a function)
chr()
returns a character from a Unicode code point
classmethod()
defines a class method inside a class
compile()
compiles code (string or AST) into a code object
complex()
creates a complex number
delattr()
deletes an attribute from an object
dict()
creates a dictionary
dir()
lists all attributes and methods of an object
divmod()
returns quotient and remainder as a tuple
enumerate()
returns an enumerate object with index + value pairs
eval()
evaluates a string as Python code
exec()
executes Python code dynamically
filter()
filters elements of an iterable using a function
float()
converts a value to a floating-point number
format()
formats a value into a string
frozenset()
creates an immutable set
getattr()
gets the attribute of an object
globals()
returns the dictionary of global variables
hasattr()
checks if an object has a named attribute
hash()
returns the hash value of an object
help()
shows the help system/documentation
hex()
converts a number to hexadecimal string
id()
returns the unique ID of an object
input()
reads input from the user
int()
converts a value to an integer
isinstance()
checks if an object is an instance of a class
issubclass()
checks if a class is a subclass of another class
iter()
returns an iterator for an iterable
len()
returns the length of an object
list()
creates a list
locals()
returns the dictionary of local variables
map()
applies a function to each element of an iterable
max()
returns the largest item in an iterable
memoryview()
creates a memory view object
min()
returns the smallest item in an iterable
next()
retrieves the next item from an iterator
object()
creates a new base object
oct()
converts a number to octal string
open()
opens a file and returns a file object
ord()
returns the Unicode code point of a character
pow()
returns x raised to the power y (optionally modulo z)
print()
prints text/output to the console
property()
defines a property in a class
range()
returns a sequence of numbers
repr()
returns a string representation of an object
reversed()
returns a reversed iterator
round()
rounds a number to given digits
set()
creates a set
setattr()
sets an attribute of an object
slice()
creates a slice object for indexing
sorted()
returns a sorted list from an iterable
staticmethod()
defines a static method inside a class
str()
converts a value to a string
sum()
sums items of an iterable
super()
calls a method from a parent class
tuple()
creates a tuple
type()
returns the type of an object (or creates a class)
vars()
returns the dict attribute of an object
zip()
combines multiple iterables into tuples
import()
imports a module dynamically