Cody Bable

Generation

generate functionSun, 23 Apr 2023

check if input is file, if not make it a file

def make_file(filename): if '.txt' in filename: pass else: filename = filename + '.txt' return filename filename = 'test' make_file(filename)

Questions about programming?Chat with your personal AI assistant