I am trying to use the path as input instead of a file name.
I tried
from pathlib import path
file_to open = Path (source/input*/in.txt)
with open ('file_to_open', 'r') as f_i:
for line in f_i:
I could not be able to open the path. Please suggest me efficient methods to open the file using a path instead of file name.