Data Science Guy
Saturday, January 21, 2017
Replace Multiple Characters in a String At Once with Python
s = "MARCH - ANN"
Want to remove whitespace and -
s1 = s.replace(" ", "").replace("-", "")
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment