I'd like to remove everything after ?
character in my csv.
Currently, it's like this: abc?123
I'd like to have it like this: abc
This is my code:
with open('Health.csv', 'r') as file, open('Health2.csv', 'w') as file2:
for line in file:
line2 = line.rstrip('?')
print(line2)
file2.write(line2)
What am I doing wrong?