I have a folder in which the files are all named like
"12345input789"
"12345output291"
I want to find each pair of files where the start bit ("12345") matches and perform some operation on both of the files
for file_name in os.listdir(directory):
if "input" in filename:
input = os.path.join(directory, file_name)
# how do i extract the output name string here
else:
continue
thanks in advance.