Module Assign NameStore Str If CompareEq NameLoad Str body ImportFrom alias ImportFrom alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad ImportFrom alias Assign NameStore IfExp CompareEq NameLoad Str NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore CompareLt Call NameLoad NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore IfExp NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body TryExcept body If CompareNotEq SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad body AugAssignAdd NameStore Num handlers ExceptHandler type NameLoad body Continue For NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad body AugAssignAdd NameStore Num Print Call AttributeLoad Str attr NameLoad NameLoad NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body With Call NameLoad Str body Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str
N/A N/A __author__ Chris Tabor (dxdstudio@gmail.com) N/A N/A __name__ __main__ N/A os getcwd os sys N/A N/A N/A N/A sys path append N/A getcwd MOAL.helpers.display Section N/A DEBUG N/A N/A __name__ __main__ True False hamming N/A N/A str1 str2 N/A N/A N/A Algorithm based on an old project of mine, ported from yavascript:
    christabor.github.io/etude/09-02-2014/.

    A superior algorithm exists at
    wikipedia.org/wiki/Hamming_distance#Algorithm_example,
    but copying it would defeat the purpose. N/A dist 0 N/A last_longer N/A N/A len str1 N/A len str2 N/A N/A first last N/A last_longer N/A str1 str2 N/A str2 str1 N/A N/A k letter N/A enumerate str1 N/A N/A N/A N/A N/A N/A str1 N/A k N/A str2 N/A k N/A N/A dist 1 N/A N/A N/A IndexError N/A N/A N/A k N/A range N/A len first N/A len last N/A N/A dist 1 N/A N/A N/A Hamming dist for `{}` and `{}` = {} format str1 str2 dist N/A dist N/A N/A N/A __name__ __main__ N/A N/A N/A Section Algorithms / coding theory - Hamming distance N/A N/A N/A hamming Sanguine swine Dandelion wine N/A N/A hamming Foo Foobar N/A N/A hamming 0123 12345 N/A N/A hamming Grape drank Ape rank N/A N/A hamming 011011101 110110101