Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sets import Set
- from result import Result
- if __name__ == '__main__':
- a = Set([
- Result('A', 10),
- Result('B', 10),
- Result('C', 10),
- Result('D', 10)
- ])
- b = Set([
- Result('E', 10),
- Result('F', 10),
- Result('A', 10),
- Result('G', 10)
- ])
- tmp = a + b
- for i in a:
- if i in b:
- tmp[tmp.index(i)] += b[b.index(i)]
- print(tmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement