How can I append values in the same csv files when there is other code in the middle? I have tried opening and closing the file multiple times and I have also tried opening