Are sets in Python mutable?
In other words, if I do this:
x = set([1, 2, 3])y = xy |= set([4, 5, 6])
Are x
and y
still pointing to the same object, or was a new set created and assigned to y
?
Are sets in Python mutable?
In other words, if I do this:
x = set([1, 2, 3])y = xy |= set([4, 5, 6])
Are x
and y
still pointing to the same object, or was a new set created and assigned to y
?