getattr()
Reads an attribute whose name is supplied as a string.
CKTIS / Python
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Reads an attribute whose name is supplied as a string.
Returns the dictionary implementing the current module’s global namespace.
Attempts an attribute lookup and reports whether it finishes without AttributeError.
Computes a hash code used by sets and dictionaries for hashable objects.
Displays interactive documentation for a supplied object.
Formats an integer as a hexadecimal string with a base prefix.
Returns an integer identifying an object during its lifetime.
Invokes the import mechanism using a module name supplied as a string.
input reads a line from standard input and returns a string without its final newline. It does not automatically turn typed digits into a number.
int creates an integer from a suitable number or text. Converting a floating-point value truncates its fractional part towards zero; it does not round to the nearest integer.
Tests whether an object is an instance of a type or a compatible subclass.
Tests a subclass relationship between classes.
Constructs an iterator, optionally calling an object without arguments until it returns a matching sentinel.
len returns the number of elements in an object that supports length. For strings it counts Unicode code points, not bytes or necessarily the characters a person sees.
Materializes the items of an iterable into a new mutable list.
Returns a mapping describing local name bindings in the current scope.
Lazily calls a function with one successive item from each input iterable.
Selects the input item with the largest comparison key.
Exposes an existing buffer through a view without copying its data.
Returns the input item with the smallest comparison key.
Advances an iterator by one position and returns the item.
Creates a fresh instance of the common base class for Python objects.
Formats an integer as a base-eight string with an octal prefix.
Opens a file as a text or binary stream according to its mode.