Short code for hamming number

allanbreyes Oct 29th, 2014 (edited) 362 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def hamming(a, b):
  2.     return sum(x != y for x, y in map(None, a, b))
RAW Paste Data
Want to get better at Python?
Learn to code Python in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!