Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s1 = []
- with open('k15.csv', 'r') as file:
- s = file.readlines()
- for i in range(1, len(s)):
- s1.append(s[i][:s[i].rfind(',') + 1] + f"{int(s[i][s[i].rfind(',') + 1:]) - 1}")
- with open('k15_changed.csv', 'w') as file:
- print(*s1, file=file, sep='\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement