Refactor hamming.py

hamming.py
 -- remove list comprehension
 -- simplify return statement