What I am trying to do is go through all files in a directory that start with a certain date, from there I replace that date in the file with new one, However all my new files just have "n" in them. What am I doing wrong? so heres the code: for i in dates: datepicker=random.randint(1,22) ...