rando
rando

Reputation: 67

Replacing ' (APOSTROPHE) in a list of string

I want to replace ' in a list of string using python. currently i am using a method for replacing characters as shown below, replace('+', ' ') Apparently, i cannot use the same method to replace the Apostrophe.

Upvotes: 1

Views: 497

Answers (1)

GKFX
GKFX

Reputation: 1400

Just escape it.

replace('\'', ' ')

Upvotes: 1

Related Questions