Advertisement
maxim_shlyahtin

Untitled

Nov 28th, 2020 (edited)
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. s1 = []
  2. with open('k15.csv', 'r') as file:
  3.     s = file.readlines()
  4. for i in range(1, len(s)):
  5.     s1.append(s[i][:s[i].rfind(',') + 1] + f"{int(s[i][s[i].rfind(',') + 1:]) - 1}")
  6. with open('k15_changed.csv', 'w') as file:
  7.     print(*s1, file=file, sep='\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement