fork download
  1. def same(x,y): return ('.', '.') if x==y else (x,y)
  2.  
  3. a = "atcgatcgaaa"
  4. b = "atccagcgaac"
  5. c = [ same(x,y) for x,y in zip(a,b) ]
  6. c1, c2 = zip(*c)
  7.  
  8. print(''.join(c1))
  9. print(''.join(c2))
Success #stdin #stdout 0.02s 9936KB
stdin
Standard input is empty
stdout
...g.t....a
...c.g....c