What is the result of the intersection operation between two sets?
- A set containing all elements common to both sets
- A set containing all elements in either set
- A set containing elements unique to the first set
- An empty set
The intersection operation between two sets in Python returns a new set containing all elements that are common to both sets. If there are no common elements, it returns an empty set.
Loading...
Related Quiz
- In Python, the ____ method is used to initialize the object’s attributes when an object is created.
- What do you call a function defined inside another function in Python?
- How would you analyze the reference count of an object in Python to debug memory issues?
- You are reviewing a piece of code where the developer imported the numpy library as np and the pandas library as pd. These are examples of what concept in Python?
- In which file mode can you read from and write to a file simultaneously?