0

I am variable which is a file path ie C:\temp
Inside temp i have csv files all with the format number01.csv number02.csv and so on x amount of times

what my script does is read the original csv file from temp do some modifications and then creates an updated csv file.

right now each time i have to change the file path indivdually but i am looking for a way to automate it

this is what I am trying to do

numbers= [5,6,7,8]
for x in number:
    file_name =  'C:\\temp\number{x}.csv'
    output_file = 'C:\\temp\number{x}_rev.csv'

how can i add an integer value in the middle of a string in python3?

william_
  • 1,131
  • 6
  • 20

0 Answers0