SHARE
TWEET

Untitled

a guest Feb 21st, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top