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

how to find and replace and add new string from particular position either tuple or list or string using python

$
0
0

I have a string with is required to replace multiple places and add new string from particular position.Input is[(stack_overflow('abc','xyz')\n stack_overflow_is_used_for_queries('defgh','mnopq')\n stack_overflow('abc','ijk')\n stack_overflow_is_used_for_queries('defgh','mnopq'))]

output like:[(search_site('xyz','ijklmn')\n best_search_for_queries('mnopq','search_string')\n search_site('ijk','ijklmn')\n stack best_search_for_queries('mnopq','search_string'))]

Note: which text is bold that would be find and replace, which text is ITALIC that is remove from input and add as a new text in output


Viewing all articles
Browse latest Browse all 17360

Latest Images

Trending Articles



Latest Images

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