22 lines
476 B
Python
22 lines
476 B
Python
def z_calculations(input_sets, u_set):
|
|
x = u_set - input_sets[1]
|
|
y = u_set - input_sets[0]
|
|
results = set()
|
|
for curr_elem in x:
|
|
if (curr_elem not in y):
|
|
results.add(curr_elem)
|
|
|
|
for curr_elem in y:
|
|
if (curr_elem not in x):
|
|
results.add(curr_elem)
|
|
|
|
return [x, y, results]
|
|
|
|
def z_calculations_in(input_sets, u_set):
|
|
x = u_set - input_sets[1]
|
|
y = u_set - input_sets[0]
|
|
|
|
results = x ^ y
|
|
|
|
return results
|