Advertisement
biswasrohit20

harshit2

Mar 14th, 2021
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. new_lst = []
  2. for i in lst1:
  3. nomatch = True
  4. for j in lst2:
  5. if i == j:
  6. nomatch = False
  7. if nomatch:
  8. new_lst.append(i)
  9.  
  10. for k in lst2:
  11. nomatch = True
  12. for l in lst1:
  13. if k == l:
  14. nomatch = False
  15. if nomatch:
  16. new_lst.append(k)
  17.  
  18. new_lst.sort()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement