Example:
f = open (path/pdf1.pdf)
f1 = open (path/pdf2.pdf)
f2 = open (path/pdf3.pdf)
Can the above be ran in a loop?
Example:
f = open (path/pdf1.pdf)
f1 = open (path/pdf2.pdf)
f2 = open (path/pdf3.pdf)
Can the above be ran in a loop?
Yes, here is one implementation of a loop (f string needs python 3):
for x in range(1,4):
f = open(path/ (f"pdf{x}.pdf"))
Note that this doesn't do anything with the file though. This also doesn't follow best file practices (really should use a context manager). Can't be more specific without know what you want to do with the file.