def write(path, data):
    """Write data to a text file.

    Args:
        path (str): Full path to file
        data (str): File text

    Returns:
        int: Number of characters written
    """
    with open(path, 'w') as handle:
        return handle.write(data)
