check if input is file, if not make it a file
# Define function to check if string is a file def is_file(file_name): if file_name.endswith('.txt'): print(file_name) return file_name else: new_file_name = f'{file_name}.txt' print(new_file_name) return new_file_name is_file('file1')