def nao_comuns(a,b):
a_b = a+b # juntar as duas para percorrer todos os elementos
nao_comuns = []
for ele in a_b:
if ele not in a or ele not in b: # nao existe numa delas
nao_comuns.append(ele)
return nao_comuns
a = range(10) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
b = range(0,20,2) # [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
print nao_comuns(a,b) # [1, 3, 5, 7, 9, 10, 12, 14, 16, 18]
ZGVmIG5hb19jb211bnMoYSxiKToKICAgIGFfYiA9IGErYiAjIGp1bnRhciBhcyBkdWFzIHBhcmEgcGVyY29ycmVyIHRvZG9zIG9zIGVsZW1lbnRvcwogICAgbmFvX2NvbXVucyA9IFtdCiAgICBmb3IgZWxlIGluIGFfYjoKICAgICAgICBpZiBlbGUgbm90IGluIGEgb3IgZWxlIG5vdCBpbiBiOiAjIG5hbyBleGlzdGUgbnVtYSBkZWxhcwogICAgICAgICAgICBuYW9fY29tdW5zLmFwcGVuZChlbGUpCiAgICByZXR1cm4gbmFvX2NvbXVucwoKYSA9IHJhbmdlKDEwKSAjIFswLCAxLCAyLCAzLCA0LCA1LCA2LCA3LCA4LCA5XQpiID0gcmFuZ2UoMCwyMCwyKSAjIFswLCAyLCA0LCA2LCA4LCAxMCwgMTIsIDE0LCAxNiwgMThdCnByaW50IG5hb19jb211bnMoYSxiKSAjIFsxLCAzLCA1LCA3LCA5LCAxMCwgMTIsIDE0LCAxNiwgMThd