Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23160

How to replace double quotes within double quotes in a string with a specific string?

$
0
0
name = "HIGHLY"SUCCE?SS+"FUL"RATE"

i need a Python code where I need to replace double quotes with {+} except the ones in the ends, that is replace 2nd and 3rd and 4th double quote with {+}

Result required:

name = "HIGHLY{+}SUCCE?SS+{+}FUL{+}RATE"

Starting and ending quotes should be left as is


Viewing all articles
Browse latest Browse all 23160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>