def readfile(file_object):
    """
    Return the content of the file as a string.

    Parameters
    ----------
    file_object : file or str
        The file to read. This can be either a File object or a file path.

    Returns
    -------
    content : str
        The content of the file.

    """
    if hasattr(file_object, "read"):
        return file_object.read()
    elif isinstance(file_object, str):
        f = open(file_object, "r")
        content = f.read()
        f.close()
        return content
    else:
        raise ValueError("``file_object`` must be a string or a file object!")