About 180,000 results
Open links in new tab
  1. How to use string.replace() in python 3.x - Stack Overflow

    Feb 26, 2012 · The string.replace() is deprecated on python 3.x. What is the new way of doing this?

  2. python - How to search and replace text in a file - Stack Overflow

    How do I search and replace text in a file using Python 3? Here is my code: import os import sys import fileinput print ("Text to search for:") textToSearch = input ("> ") pr...

  3. python - How to replace text in a string column of a Pandas …

    If you only need to replace characters in one specific column, somehow regex=True and in place=True all failed, I think this way will work: data["column_name"] = …

  4. python .replace () regex - Stack Overflow

    It will replace non-everlaping instances of pattern by the text passed as string. If you need to analyze the match to extract information about specific group captures, for instance, you can …

  5. How to use python-docx to replace text in a Word document and …

    If you replace the entire text of a paragraph, that will remove any character-level formatting, like a word or phrase in bold or italic. By the way, the code from @wnnmaw's answer is for the …

  6. Search and replace for text within a pdf, in Python

    Search and replace for text within a pdf, in Python [duplicate] Asked 8 years, 9 months ago Modified 3 years, 1 month ago Viewed 58k times

  7. python - Finding and replacing elements in a list - Stack Overflow

    I have to search through a list and replace all occurrences of one element with another. So far my attempts in code are getting me nowhere, what is the best way to do this? For example, …

  8. Search and replace a line in a file in Python - Stack Overflow

    Sep 2, 2008 · I want to loop over the contents of a text file and do a search and replace on some lines and write the result back to the file. I could first load the whole file in memory and then …

  9. python - Recursively find and replace string in text files - Stack …

    For those using Python 3.5+ you can now use a glob recursively with the use of ** and the recursive flag. Here's an example replacing hello with world for all .txt files:

  10. How to Find & Replace in Jupyter Lab - Stack Overflow

    Dec 27, 2019 · Please help JupyterLab devs improve the situation by chiming in discussing usability of find-and-replace function. Please give thumbs up to solutions that you like, and …