I have a lot of files that need to be saved inside one folder, but the files that need to be saved have the same name except for one part. So, instead of editing one by one, I want to insert variables into similar parts of the names.
Eg:
D = r"c:\users\folder"
f1 = D + r"\apple_table.bin"
f2 = D + r"\apple_chair.bin"
So, I want to replace apple with variable. Like this but my example got an error
A = apple
F1 = D + r"\ A + table.bin"
F2 = D + r"\ A + chair.bin"
In my project, A
keeps changing. So, I need to edit them one by one and it is so painful and slows down me.