What is the difference between add and update operations in python if i just want to add a single value to the set.
a = set() a.update([1]) #works a.add(1) #
add only accepts a hashable type. A list is not hashable.
add