def uniqfile( title, suffix ):
    print('input: '+title)
    if os.path.isfile(title+suffix):
        title += " "
        uniqfile(title, suffix)
    else:
        return title+suffix
The first print line within it returns the correct output, but when the function is supposed to finally return the properly appended title value, it instead returns None.
How do I get the value returned properly so that I may assign it to a variable to print out and save the file uniquely named?
namepdf = uniqfile(row[0], '.pdf')
 
    