remove commas from string python

219

Python How To Remove Commas From String -

import re

my_string="Python, How To, Netherlands"
print("Original String is:")
print(my_string)

transformed_string=re.sub(",","",my_string)
print("Transformed String is:")
print(transformed_string)

Comments

Submit
0 Comments