I like to save the two print statements in 2 different variables. How can i do this?
with open(file_to_open) as f: for line in f: # split the line line = line.strip() columns = line.split(",") if columns[0] == "1": print(line, end='') if columns[0] == "2": print(line, end='')