Add Set Items
add includes one element in a set, while update consumes elements from an iterable. Duplicate equal elements remain represented only once.
Understand the idea
Elements must be hashable. A tuple of immutable values can be an element, while a normal list cannot. Passing a string to update adds its individual characters because a string is iterable; use add for one whole string label. This difference mirrors append versus extend in lists.
Where to try it
Open this example with Try in playground. The code loads as editable text and does not run until you select Run. The first run downloads Python. Each run starts fresh; temporary files created by a script are not files on your PC.
A worked example
tags = {"web"}
tags.add("python")
tags.update(["data", "web"])
print(sorted(tags))
Read the result
The unique result is ['data', 'python', 'web'].
Try one change
Add a whole string with add, then compare with update on a separate disposable set.