Which built-in function can be used to create a set in Python?
- create_set()
- make_set()
- new_set()
- set()
The built-in function set() is used to create a set in Python. You can use it by calling set(), and you can pass an iterable (like a list) as an argument to initialize the set with elements.
Loading...
Related Quiz
- Which Seaborn function would you use to visualize a bivariate distribution of two variables?
- You're reviewing a Python class and notice that many attributes are accessed and modified directly, without any checks. What could be introduced to provide controlled access and validation to these attributes?
- The ____ function in TensorFlow or PyTorch is used to compute the gradient of a computation with respect to its input variables.
- In Pandas, how can you filter the rows of a DataFrame where the value in a specific column is greater than a threshold?
- Which keyword is used to import a module in Python?