fork download
  1. #!/usr/bin/env python3
  2. str1 = 'abcd1234'
  3. str2 = 'bcde2345'
  4. str3 = '7:69h5i>'
  5.  
  6. ord1 = (ord(c) for c in str1)
  7. ord2 = (ord(c) for c in str2)
  8. ord3 = (ord(c) for c in str3)
  9.  
  10. diffs = (x - y for x,y in zip(ord1, ord2))
  11.  
  12. result = (chr(x + y) for x,y in zip(diffs, ord3))
  13.  
  14. print(''.join(result))
Success #stdin #stdout 0.02s 9936KB
stdin
Standard input is empty
stdout
6958g4h=