filmov
tv
Python Tutorial: Set in Python

Показать описание
#region Notes
"""
Mutable
Un-ordered sequence
No Duplicate values
Heterogenous
Elements should be immutable.
"""
#endregion
# a={"Ravi",12,12.5,True,12,12,12}
# print((a))
"""
Set ADT
Union of two sets.
Intersection of two set.
Difference of two sets.
symmetric difference of two sets.
Adds all elements of array B to the set A.
Remove all elements of array B to the set A.
"""
#region 1
b=set({1,2,3})
c=({7,4,5,2})
print(c)
#endregion
"""
Mutable
Un-ordered sequence
No Duplicate values
Heterogenous
Elements should be immutable.
"""
#endregion
# a={"Ravi",12,12.5,True,12,12,12}
# print((a))
"""
Set ADT
Union of two sets.
Intersection of two set.
Difference of two sets.
symmetric difference of two sets.
Adds all elements of array B to the set A.
Remove all elements of array B to the set A.
"""
#region 1
b=set({1,2,3})
c=({7,4,5,2})
print(c)
#endregion