set1=list(map(str,input().split(',')))
set2=list(map(str,input().split(',')))
print('choice one option 1)add 2)remove 3)difference 4)intersection ')
n=int(input())
print('choice one 1)set1 2)set2')
p=int(input())
if(n==1):
st=str(input())
if(p==1):
a=set(set1)
a.add(st)
print("set("+str(list(sorted(a)))+")")
elif(p==2):
a=set(set2)
a.add(st)
print("set("+str(list(sorted(a)))+")")
else:
print('invalid choice')
elif(n==2):
st=str(input())
if(p==1):
a=set(set1)
a.remove(st)
print("set("+str(list(sorted(a)))+")")
elif(p==2):
a=set(set2)
a.remove(st)
print("set("+str(list(sorted(a)))+")")
else:
print('invalid choice')
elif(n==3):
if(p==1):
a=set(set1)
b=set(set2)
c=list(sorted(a.difference(b)))
print("set("+str(c)+")")
elif(p==2):
a=set(set1)
b=set(set2)
c=list(sorted(b.difference(a)))
print("set("+str(c)+")")
else:
print('invalid choice')
elif(n==4):
if(p==1):
a=set(set1)
b=set(set2)
c=list(sorted(a.intersection(b)))
print("set("+str(c)+")")
elif(p==2):
a=set(set1)
b=set(set2)
c=list(sorted(b.intersection(a)))
print("set("+str(c)+")")
else:
print('invalid choice')
Replies to lists 19 
Title |
Name |
Language |
UNIX |
When |
variables 6 |
kush |
text |
1579288331 |
5 Years ago. |
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}