What is Python? Python is a high-level, interpreted, general-purpose programming language that was created by Guido van Rossum and released in 1991. What is PEP 8? PEP 8 is a coding style guide for Python that defines how to format Python code for maximum readability. What is a decorator in Python? A decorator in Python is a special function that modifies the behavior of another function. It is used to add functionality to an existing function without changing its code. What is a generator in Python? A generator in Python is a special type of iterator that allows you to iterate over a potentially infinite sequence of values without generating them all at once. What is the difference between a list and a tuple in Python? A list is a mutable sequence of values, while a tuple is an immutable sequence of values. In other words, you can modify a list, but you cannot modify a tuple. What is the difference between a set and a frozenset in Python? A set is a mutable collection of unique elements, while a frozenset is an immutable collection of unique elements. What is the difference between a dictionary and a defaultdict in Python? A dictionary is a collection of key-value pairs, while a defaultdict is a subclass of dictionary that provides a default value for keys that do not exist. What is the difference between a function and a method in Python? A function is a block of code that performs a specific task and returns a value, while a method is a function that is associated with an object and is called on that object. What is a lambda function in Python? A lambda function in Python is an anonymous function that can take any number of arguments but can only have one expression. What is the difference between a module and a package in Python? A module is a single file that contains Python code, while a package is a collection of modules that are organized in a directory hierarchy. What is the difference between the ‘is’ and ‘==’ operators in Python? The ‘is’ operator checks whether two objects are the same object in memory, while the ‘==’ operator checks whether two objects have the same value. What is the difference between the ‘append’ and ‘extend’ methods of a list in Python? The ‘append’ method adds a single item to the end of a list, while the ‘extend’ method adds multiple items to the end of a list. What is a list comprehension in Python? A list comprehension in Python is a concise way to create a new list by applying a function to each element of an existing list. What is a generator expression in Python? A generator expression in Python is a concise way to create a new generator by applying a function to each element of an existing generator. What is the difference between a class and an object in Python? A class is a blueprint for creating objects, while an object is an instance of a class.