final changes to A4 code
This commit is contained in:
parent
736f047a30
commit
be62430a8b
@ -47,7 +47,7 @@ def size(Set):
|
||||
print(f"Size of set is:\t{len(Set)}")
|
||||
|
||||
def iterator(setA):
|
||||
a = iter(setA)
|
||||
a = iter(setA) # iter is a built-in function
|
||||
for i in range(0,len(setA)-1):
|
||||
print(next(a),"->",end=' ')
|
||||
print(next(a))
|
||||
@ -100,7 +100,7 @@ def main():
|
||||
print("2 -> Remove value from set")
|
||||
print("3 -> Search value in set")
|
||||
print("4 -> Show size of set")
|
||||
print("5 -> Iterator (implementation pending)")
|
||||
print("5 -> Iterate")
|
||||
print("6 -> Intersection of two sets")
|
||||
print("7 -> Union of two sets")
|
||||
print("8 -> Difference of two sets")
|
||||
|
Loading…
Reference in New Issue
Block a user