Amazon Interview Question

non repeatable character, python functions