Fixed python to not use a hard coded K char, and to actually use the key array