This commit is contained in:
K 2024-02-24 01:07:52 +05:30
parent 537edadc18
commit 21b3b3b128
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

View File

@ -46,6 +46,12 @@ def size(Set):
# Function to print size (length) of set
print(f"Size of set is:\t{len(Set)}")
def iterator(setA):
a = iter(setA)
for i in range(0,len(setA)-1):
print(next(a),"->",end=' ')
print(next(a))
def intersection(setA, setB):
# Function to perform intersection of two sets
intersectionSet = []
@ -54,12 +60,6 @@ def intersection(setA, setB):
intersectionSet.append(i)
print(f"Intersection is:\t{intersectionSet}")
def iterator(setA):
a = iter(setA)
for i in range(0,len(setA)-1):
print(next(a),"->",end=' ')
print(next(a))
def union(setA, setB):
# Function to perform union of two sets
unionSet = []