To provide a high-level programming language that emphasizes code readability and simplicity.
A list is mutable (can be changed), while a tuple is immutable (cannot be changed).
A collection of key-value pairs, where each key is unique and maps to a value.
An unordered collection of unique elements, used for membership testing and eliminating duplicates.
An anonymous function defined with the 'lambda' keyword, often used for short, throwaway functions.
It refers to the instance of the class, allowing access to its attributes and methods.
'==' checks for value equality, while 'is' checks for identity (whether two references point to the same object).
A concise way to create lists using a single line of code, often with a for loop and an optional condition.
It is used for resource management, ensuring that resources are properly acquired and released, such as file handling.
It is used for exception handling, allowing you to catch and handle errors gracefully without crashing the program.
It is used to iterate over a sequence (like a list or string) using the 'for item in sequence' format.
It is used to execute a block of code as long as a condition is true, using the 'while condition' format.
It is used to exit a loop prematurely, skipping any remaining iterations.
It is used to skip the current iteration of a loop and continue with the next iteration.
It is a null operation, used as a placeholder in code where a statement is syntactically required but no action is needed.
It is used to define a function, allowing you to group code into reusable blocks.
It is used to exit a function and return a value to the caller.
It is used to include external modules or libraries in your code, allowing you to use their functions and classes.
It is used to import specific attributes or functions from a module, allowing you to use them without the module prefix.
It is used to create an alias for a module or function, allowing you to use a shorter name in your code.
It is used to create isolated Python environments, allowing you to manage dependencies for different projects.
'copy' creates a shallow copy, while 'deepcopy' creates a deep copy, duplicating all objects recursively.
It adds a counter to an iterable, returning both the index and the value during iteration.
'args' is used to pass a variable number of positional arguments, while 'kwargs' is used for keyword arguments.
A mutex that protects access to Python objects, allowing only one thread to execute Python bytecode at a time.
'staticmethod' does not access or modify the class state, while 'classmethod' takes the class as its first parameter.
It provides functions for efficient looping, such as combinations, permutations, and infinite iterators.
'isinstance()' checks if an object is an instance of a class or subclass, while 'type()' checks the exact type.
It combines multiple iterables into tuples, pairing elements with the same index.
'del' deletes an object or variable, while 'remove()' removes an element from a list by value.
It is used to count the occurrences of elements in an iterable, returning a dictionary-like object.
'all()' returns True if all elements are true, while 'any()' returns True if at least one element is true.
It applies a given function to each item in an iterable, returning a map object.
It filters elements in an iterable based on a function that returns True or False.
'sorted()' returns a new sorted list, while 'sort()' modifies the list in place.
It provides support for regular expressions, allowing pattern matching and text manipulation.
'yield' is used in generators to produce values lazily, while 'return' exits a function and returns a value.
It is used to cache the results of expensive function calls, improving performance for repeated calls.
'bytes' is immutable, while 'bytearray' is mutable and allows modification.
It provides functions for interacting with the operating system, such as file and directory manipulation.
It is used for writing asynchronous programs, enabling concurrency with coroutines, event loops, and tasks.
A coroutine is used for asynchronous programming, while a generator is used for producing values lazily in a synchronous manner.
It is a class of a class, used to control the behavior and creation of classes.
An abstract class can have both concrete and abstract methods, while an interface (using ABC) defines only abstract methods.
It is used to create processes, enabling parallel execution and bypassing the Global Interpreter Lock (GIL).
'threading' uses threads within a single process, while 'multiprocessing' creates separate processes with independent memory.
It is used to manage context-local state, especially in asynchronous programming.
It provides a decorator and functions for creating classes with minimal boilerplate code for storing data.
'pickle' serializes Python objects into a binary format, while 'json' serializes objects into a human-readable text format.
It provides tools for creating weak references to objects, allowing them to be garbage-collected.
It is used to call functions in shared libraries or DLLs and manipulate C data types in Python.
It provides functions for introspecting live objects, such as retrieving source code, signatures, and documentation.
Deep learning uses neural networks with multiple layers, while machine learning includes a broader range of algorithms.
It provides a high-level interface for asynchronously executing functions using threads or processes.
It is used to spawn new processes, connect to their input/output/error pipes, and obtain their return codes.
It provides a flexible framework for emitting log messages from Python programs.
Synchronous programming executes tasks sequentially, while asynchronous programming allows tasks to run concurrently.
It provides functions for implementing heaps, a type of priority queue.
It provides support for fast and precise decimal floating-point arithmetic.
It provides support for rational number arithmetic using fractions.
It is used to generate universally unique identifiers (UUIDs).
It is used for parsing command-line arguments and options.
It is the built-in debugger for Python, used for debugging Python programs interactively.
It is used to define and work with asynchronous functions and coroutines.
It is a tool for managing multiple Python versions on a single system.