About 153,000 results
Open links in new tab
  1. Does Python have a string 'contains' substring method?

    Aug 9, 2010 · 568 Does Python have a string contains substring method? 99% of use cases will be covered using the keyword, in, which returns True or False:

  2. string - What's the difference between str.isdigit (), isnumeric () …

    52 The Python documentation notes the difference between the three methods. str.isdigit Return true if all characters in the string are digits and there is at least one character, false otherwise. …

  3. What is the most efficient string concatenation method in Python ...

    Is there an efficient mass string concatenation method in Python (like StringBuilder in C# or StringBuffer in Java)? I found following methods here: Simple concatenation using + Using a …

  4. python - Call method from string - Stack Overflow

    If I have a Python class, and would like to call a function from it depending on a variable, how would I do so? I imagined following could do it: class CallMe: # Class def App(): # Method one ...

  5. Can you call multiple methods on one line? - Stack Overflow

    Mar 2, 2015 · With great python comes great responsibility: don't abuse this feature! The canonical maximum line length codified in PEP 8 is 80 characters, and the canonical way to …

  6. python - How to change a string into uppercase? - Stack Overflow

    How can I convert a string into uppercase in Python? When I tried to research the problem, I found something about string.ascii_uppercase, but it couldn't solve the problem:

  7. python - What exactly does the .join () method do? - Stack Overflow

    I'm pretty new to Python and am completely confused by .join() which I have read is the preferred method for concatenating strings. I tried: strid = repr(595) print array.array('c', random.sample(

  8. python - Remove all whitespace in a string - Stack Overflow

    Oct 1, 2016 · All string characters are unicode literal in Python 3; as a consequence, since str.split() splits on all white space characters, that means it splits on unicode white space …

  9. python - String formatting: % vs. .format vs. f-string literal - Stack ...

    To answer your second question, string formatting happens at the same time as any other operation - when the string formatting expression is evaluated. And Python, not being a lazy …

  10. python - How to replace multiple substrings of a string ... - Stack ...

    I would like to use the .replace function to replace multiple strings. I currently have string.replace("condition1", "") but would like to have something like …