//
sign in
Post
by @danabra.mov
PostEmbed
by @danabra.mov
Record
by @jimpick.com
Record
by @atsui.org
+ new component
Post
Python's sets support set arithmetic using operators. >>> a = {1, 2, 3, 4, 7} >>> b = {1, 3, 5, 7, 9} Union: >>> a | b {1, 2, 3, 4, 5, 7, 9} Intersection: >>> a & b {1, 3, 7} Asymmetric difference: >>> a - b {2, 4} Symmetric difference: >>> a ^ b {2, 4, 5, 9}