def column_to_spaces(line, col):
    """Returns the number of space required to reach a point in a string"""
    spaces = 0
    for colno, char in enumerate(line):
        spaces += 4 if col == '\t' else 1
        if colno + 1 == col:
            return spaces
    return spaces
