Jan-27-2023, 08:12 AM
well, could not get to sleep without trying it.
It prints just --1 and stops. I'm expecting the first 'for' loop will keep going but it stops.
Should print:
--1
--2
--3
It prints just --1 and stops. I'm expecting the first 'for' loop will keep going but it stops.
Should print:
--1
--2
--3
with open("C:/01/file1.txt", 'r') as f: with open("C:/01/file2.txt", 'r') as fe: for line_f in f: #print(f"F1 >{line_f}") for line_fe in fe: #print(f"F2 >{line_fe}") if line_f == line_fe: print(f"-- {line_fe}")