import io


def print_str(*args, **kwargs):
    """
    Same as print() signature but returns a string
    """
    sstream = io.StringIO()
    kwargs.pop('file', None)
    print(*args, **kwargs, file=sstream)
    return sstream.getvalue()