Skip to content
murmot

Results for “python string replace example code java find pdf site:discuss.python.org”

  • discuss.python.org

    Error in finding text in a PDF - Python Help - Discussions on...

    Found b Found b Found b Found b Found b. Could anyone please tell me what is going wrong.In Python, strings are immutable objects, and you cannot change them. If you want to replace their content, you need to create a new string such as. Text = Text.replace(...)

  • discuss.python.org

    Discussions on Python.org

    Discussions related to the Python Programming Language, Python Community, and Python Software Foundation operations.

  • discuss.python.org

    Convert PDF into TXT - Discussions on Python.org

    Apr 12, 2023 · Good day community, I’m trying to compile some code to convert PDF to text, but the result is not what I expected. I have tried different libraries such as pytesseract, pdfminer, pdftotext, pdf2image, and OpenCV, but all of them extract the text incompletely or with errors. The last two codes that I used are these: CODIGO 1 import pytesseract from pdf2image import convert_from_path ...

  • discuss.python.org

    Is there an easier way to replace multiple different things at once

    im trying to use the .replace() mutiple times at once and i was wondering if there was a cleaner way to do it. Code exampleOtherwise you run al sorts of risks around having your replacement strings as part of the data, for example strings containing curly brackets.

  • discuss.python.org

    Python string find () examples - Python Help - Discussions on ...

    Oct 17, 2022 · From the Python documentation: If you look for substring sub in a string: Return -1 if sub is not found. This can be found at: Python documentation Built-in Types The following sections describe the standard types that are built into the interpreter. The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions. Some colle...

  • discuss.python.org

    Discussions on Python.org

    At the moment my best solution is to use replace with intermediate delimiters. However it feels like there should be a better/quicker solution. I looked at `str.translate ()`, but that is for single character replacements only. Any suggestions of an alternative way of doing this?

  • discuss.python.org

    Str.replace of a set of characters - Discussions on Python.org

    Dec 1, 2019 · I would like str.replace, when given a set of characters, to replace occurrence of any of the characters in the set. I.e. 'ASDFGH'.replace(set('SFH'), '') == 'ADG' should then hold. It would mean I would not have to go to the trouble of using the re module for a common string operation. By extension, a set of multi-character strings should have any occurrences of the strings replaced, (in an ...