Python: Built-in Functions
77 cards · 🇺🇸 English
Core built-in functions every Python developer should know.
Study all 77 cards for free
Flashcards, quizzes, pixel-art games and a daily review that remembers for you.
Try the first 10 cards
1 / 10Abs()
Tap the card for the answer · swipe right if you knew it, left if not
Already have an account? Sign in
Cards
- 1Abs()Returns the absolute value of a number (integer, float, or object implementing __abs__())
- 2All()True if all elements of the iterable are true (or if the iterable is empty)
- 3Any()True if any element of the iterable is true. If the iterable is empty, returns False
- 4Bin()Converts an integer number to a binary string prefixed with '0b'
- 5Bool()A Boolean value (True or False) using the standard truth testing procedure
- 6Breakpoint()Drops you into the debugger at the call site (calls sys.breakpointhook(), default: pdb.set_trace())
- 7Callable()True if the object appears callable, False if not
- 8Chr()Returns the string representing a character with the specified Unicode code point (inverse of ord())
- 9@classmethodA decorator that transforms a method into a class method that receives the class as implicit first argument
- 10Compile()Compiles source code into a code or AST object that can be executed by exec() or eval()
- 11Complex()A complex number from real and imaginary parts, or converts a string/number to complex
- 12Delattr()Deletes the named attribute from an object (delattr(x, 'foobar') is equivalent to del x.foobar)
- 13Dict()A new dictionary object
- 14Dir()Without arguments: names in current local scope. With an argument: list of valid attributes for that object
- 15Divmod()A pair of numbers consisting of quotient and remainder when using integer division (a // b, a % b)
- 16Enumerate()An enumerate object that yields tuples containing a count (from start, default 0) and values from iterating
- 17Default start value for enumerate()0 (can be changed with start parameter)
- 18Eval()Parses and evaluates a Python expression string and returns the result
- 19Exec()Executes dynamic Python code (string or code object), returns None
- 20Filter()An iterator from elements of iterable for which function is true (or all truthy elements if function is None)
- 21Float()Returns a floating-point number constructed from a number or string
- 22Format()Converts a value to a formatted representation as controlled by format_spec
- 23Frozenset()A new immutable frozenset object, optionally with elements from iterable
- 24Getattr()Returns the value of the named attribute of object (getattr(x, 'foobar') is equivalent to x.foobar)
- 25Globals()The dictionary implementing the current module namespace
- 26Hasattr()True if the string is the name of one of the object's attributes, False if not
- 27Hash()The hash value of the object (an integer used for dictionary key comparison)
- 28Help()Invokes the built-in help system (interactive use) - prints help page for a module, function, class, or object
- 29Hex()Converts an integer number to a lowercase hexadecimal string prefixed with '0x'
- 30Id()The identity of an object - an integer guaranteed to be unique and constant during its lifetime
And 47 more cards. Study the whole deck free
Articles about this deck
More Programming decks
See all- 🐍
Python: OOP Fundamentals
59 cards · 🇺🇸 English
Classes, inheritance, and core object-oriented Python concepts.
- 🐍
Python : avancé (décorateurs, lambda et exceptions)
97 cards · 🇺🇸 English
Décorateurs, fonctions lambda, gestion des exceptions et autres concepts Python avancés.
- 🐍
Python : structures de données et compréhensions
125 cards · 🇺🇸 English
Méthodes de listes/dictionnaires/ensembles ainsi que les compréhensions de listes, de dictionnaires et de générateurs.
- 🐍
Python: Fortgeschritten (Decorators, Lambda & Exceptions)
97 cards · 🇺🇸 English
Decorators, Lambda-Funktionen, Exception-Handling und weitere fortgeschrittene Python-Konzepte.
- 🐍
Python: Funciones integradas
77 cards · 🇺🇸 English
Funciones integradas esenciales que todo desarrollador Python debería conocer.
- 🐍
Python : fondamentaux de la POO
59 cards · 🇺🇸 English
Classes, héritage et concepts fondamentaux de la programmation orientée objet en Python.
