“Atur operator” Kode Jawaban

Atur operator

Ops 		P	⨯	 \	 =	 ≠
Front 		⊂	⊄	⊆	⊈	⊊ 
Back 		⊃	⊅	⊇	⊉	⊋
Inside 		∀	∃	∊	∍
Objects 	∅	∞	∆	∇
Category of Frogs

Atur operator

>>> a = {1, 2, 3, 4, 5, 6}
>>> b = {4, 5, 6, 7, 8, 9}
>>>
>>> a.update(b)          # a "union" operation
>>> a
{1, 2, 3, 4, 5, 6, 7, 8, 9}
>>>
>>> a &= b               # the "intersection" operation
>>> a
{4, 5, 6, 7, 8, 9}
>>>
>>> a -= set((7, 8, 9))  # the "difference" operation
>>> a
{4, 5, 6}
>>>
>>> a ^= b               # the "symmetric difference" operation
>>> a
{7, 8, 9}
Comfortable Centipede

Jawaban yang mirip dengan “Atur operator”

Pertanyaan yang mirip dengan “Atur operator”

Lebih banyak jawaban terkait untuk “Atur operator” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya