How to remove single quotes from a string in Python

Removing single quotes from a string results in a modified string that does not contain single quotes. For example, removing single quotes from “He said ‘Hello’ to me” results in “He said Hello to me”.

Solution for How to remove single quotes from a string in Python : You can use str.replace() to remove single quotes from a string Call str.replace(old, new) with old as “‘” and new as “” to remove all single quotes from the string.


how-to-remove-single-quotes-from-a-string-in-python