def write_file(content, filename):
    """
    Receives input, writes to new txt file

    input:
        content: string, to be written
        filename: filename to be written to
    output: string, confirmation
    """

    if type(content) is not str or type(filename) is not str:
        raise TypeError('You must enter valid content and filename')

    try:
        with open(filename + '.txt', 'w') as f:
            f.write(content)
            return ('Successfully saved!')
    except IOError:
        return('Failed!')