What is set when we have to use?
Answer / Anupriya Ekka
Sets are used in Python when you want to store unique elements in a particular order that does not matter. Sets can be useful for performing operations like intersection, union, difference, and membership checks on collections of data.nnTo create a set, simply enclose the elements in curly braces or use the built-in set() function:nnmy_set = {1, 2, 3}nmy_set = set([4, 5, 6])n
| Is This Answer Correct ? | 0 Yes | 0 No |
How does for loop and while loop differ in python and when do you choose to use them?
Under what circumstances would von use a while statement rather than for?
Narrate the difference between python arrays and lists.
Which ide is best for python on windows?
What is the starting point of python code execution?
Explain the disadvantages of python
What should I make with python?
How to append to a string in Python?
Is python good for desktop application?
What is == in python?
Does python have a switch-case statement?
When should you use generator expressions vs. list comprehensions in Python and viceversa?