Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. from sets import Set
  2. from result import Result
  3. if __name__ == '__main__':
  4. a = Set([
  5. Result('A', 10),
  6. Result('B', 10),
  7. Result('C', 10),
  8. Result('D', 10)
  9. ])
  10. b = Set([
  11. Result('E', 10),
  12. Result('F', 10),
  13. Result('A', 10),
  14. Result('G', 10)
  15. ])
  16. tmp = a + b
  17. for i in a:
  18. if i in b:
  19. tmp[tmp.index(i)] += b[b.index(i)]
  20. print(tmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement