Quantcast
Channel: User Hubro - Stack Overflow
Viewing all articles
Browse latest Browse all 45

Are Python sets mutable?

$
0
0

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?


Viewing all articles
Browse latest Browse all 45

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>