Generation

generate functionWed, 03 May 2023

output a file line by line

def echo_file(fname): with open(fname) as f: for line in f: print(line) echo_file('path/to/file')

Questions about programming?Chat with your personal AI assistant