Question Bank
3705 approved questions from the community
A decorator is a higher-order function that can modify the behavior of another function without changing its source code.
What does the '*args' syntax in a function definition do?
Which of the following describes a key limitation of lambda functions in Python?
According to the LEGB rule, what is the order of variable resolution in Python?
What is the difference between the '==' and 'is' operators?
Which method can be used to merge two lists into a dictionary mapping keys to values?
What is the primary difference in memory behavior between a list and a tuple?
Which block in a try-except statement executes only if no exception was raised in the try block?
In Python, modifying a mutable object (like a list) inside a function will affect the original object outside the function.
Which of these is an example of an immutable data type in Python?
What are the primary mechanisms Python uses for garbage collection?
PEP 8 is the official style guide for Python code that recommends using 4 spaces per indentation level.
How is Python code executed by the CPython interpreter?
What are the key features of Python?
What is the difference between 'mouseenter' and 'mouseover'?
All browser events bubble up from the target element to the root of the document.
When comparing ES2015 classes to ES5 function constructors, what is the 'super()' call used for?
What is a higher-order function?
How would you define a closure in JavaScript?
Which of the following is a typical use case for anonymous functions in JavaScript?