Question: # Initialize sets A and B A = { ' a ' , ' b ' , ' c ' , ' d ' ,

# Initialize sets A and B
A ={'a','b','c','d','e','f'}
B ={'c','d','f','h','j','k'}
result = sorted(A.symmetric_difference(B))
print('A =', sorted(A))
print('B =',sorted(B))
print('')
AsymdiffB = set()
# put your code here to compute the symmetric difference of A and B
# first add all the elements that are in A but not B
# then add all the elements that are in B but not A
print('Symmetric Difference of A and B =', sorted(AsymdiffB))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!