def find_char(char, word):
    """
  find the position of a character in a word, exactly the same thing as str.index but with error handling
  """
    assert len(char) == 1 and type(word) is str
    i = 0
    while i < len(word):
        if word[i] == char: break
        else: i += 1
    if i == len(word):
        return None
    return i