Skip to content
Advertisement

How to replace single quotes (‘) with ‘ in python?

How to replace single quotes (') with ' in python?

Need to convert from

JavaScript

to

JavaScript

Advertisement

Answer

Try the following code:

JavaScript

Output: {'fr': '', 'en': 'Title Edit 02'}

Explanation: Replace all ‘ with ‘. strip() can be omitted, just a fail safe.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement