How would you solve the problem of finding the first unique character in a string?
Implement first_unique_char(s), returning the zero-based index of the first character whose total frequency is one, or -1 if no such character exists. The input is a string, including the possibility of an empty string, and the result is an integer.
def first_unique_char(s):