About 188,000 results
Open links in new tab
  1. string - How do I scan a sentence in Python - Stack Overflow

    Jul 7, 2018 · If you can be sure that there are always two double-quotes in the strings you're trying to parse, you can simply use str.split('"')[0] to extract what's between them. >>> s = '''As a …

  2. Python program to check a string for specific characters

    Feb 15, 2023 · Here, will check a string for a specific character using different methods using Python. In the below given example a string 's' and char array 'arr', the task is to write a python …

  3. How To Parse a String in Python: A Step-by-Step Guide

    Python offers several methods to parse strings, including string functions, parsing libraries, and regular expressions. In this short article, we cover the various methods of parsing strings in …

  4. Search for a String in Python (Check If a Substring Is …

    May 7, 2023 · This article explains how to search a string to check if it contains a specific substring and to get its location in Python. The re module in the standard library allows more …

  5. Scan a String for Specific Characters in Python - Online Tutorials …

    Learn how to scan a string for specific characters in Python with this detailed guide, including examples and explanations.

  6. Check a string for a specific character in Python - Techie Delight

    Apr 11, 2024 · This post will discuss how to check a string for a specific character in Python. 1. Using in operator. The Pythonic, fast way to check for the specific character in a string uses …

  7. string — Common string operations — Python 3.13.3 …

    3 days ago · format (format_string, /, * args, ** kwargs) ¶ The primary API method. It takes a format string and an arbitrary set of positional and keyword arguments. It is just a wrapper that …

  8. python - How to check a string for specific characters ... - Stack Overflow

    How can I check if a string has several specific characters in it using Python 2? For example, given the following string: The criminals stole $1,000,000 in jewels. How do I detect if it has …

  9. 5 Best Ways to Scan for a String in Multiple Document Formats with Python

    Mar 9, 2024 · This article explores how to find a target string within CSV, plain text, and Microsoft Word documents using Python, with examples of input as document files and desired output …

  10. Python: 5 ways to check if a string contains a substring

    May 25, 2023 · You can use the re.search() function to search for a pattern (in the context of this article, it is a substring) within a string. Example: import re my_string = "Turtles are cool!" # …

  11. Some results have been removed
Refresh