forked from codevscolor/codevscolor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample1.py
More file actions
23 lines (23 loc) · 759 Bytes
/
example1.py
File metadata and controls
23 lines (23 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#1
setA = set()
setB = set()
#2
setA_length = int(input(“Enter the size of the first set : “))
setB_length = int(input(“Enter the size of the second set : “))
#3
print(“\n”)
print(“Enter values for the first set : \n”)
for i in range(setA_length):
e = int(input(“Enter value {} : “.format(i+1)))
setA.add(e)
#4
print(“\n”)
print(“Enter values for the second set : \n”)
for i in range(setB_length):
e = int(input(“Enter value {} : “.format(i+1)))
setB.add(e)
#5
print(“\n”)
print(“First set : {}”.format(setA))
print(“Second set : {}”.format(setB))
print(“Difference : {}”.format(setA.difference(setB)))