########## #三元运算 ##########
Format: result = value 1 if condition else value 2 #如果条件成立, assign value 1 to the result variable, otherwise assign value 2 to the result variable
########## #基本数据类型补充 ############set:
Set set, which is an unordered and non-repeating element collection amount
1.add: Adding elements
Results:
2.clear: Clear Content
Results:
3. (1) Difference: Find different elements and assign them to new values
Results:
(2) Different_updata: Find different elements and update yourself
Result: {33,44}
{55,66}
4.discard: Delete Element
Results:
The difference between discard and remove is that discard can delete the set without the element, without error. and remove cannot delete elements that are not in the collection.
5. (1) Intersection: Take intersection
Results:
(2) Intersection_updata: Take the intersection and update yourself
Results:
6.isdisjoint: If there is no intersection, if there is no return true, if there is a return false
Results:
7. (1) Issubset: Determine if it is a sub-collection
Result: True
(2) Issuperset: Determine if the parent collection
Result: True
8. (1) Pop: Remove the last set
Result: #因为集合是无序的, so the last one is not necessarily 44
(2) Remove: Removes the specified element, no error is present
Results:
9. (1) Symmetric_difference: symmetric difference Set
Results:
(2) Symmetric_difference_updata:对称差集,并更新到自己中
Results:
10.union: The Set
Results:
11.updata: Update
Python development "Fourth": Functions of Python basics