Set vs Dictionary in Python
Set stores unique values only. Dict stores key → value pairs. Both can use curly braces, which confuses freshers. {1, 2} is a set. {"a": 1} is a dict. Empty: set() vs {} (empty dict). Set answers “is Asha in the room?”. Dict answers “what are Asha’s marks?”.
Unique bag vs mapping table. Don’t store a value on a set item — there is no second slot. That is what dict is for.
Set vs Dictionary in Python — output — True then 90. Set only membership; dict gives the marks.
{ "Asha": 90, "Ravi": 85 }
│ │
key valueset() vs {} clarification.