About 526,000 results
Open links in new tab
  1. python - What does s.strip () do exactly? - Stack Overflow

    Dec 9, 2012 · Additionally, there is a very powerful tool within the Python interactive interpreter - you can do something like help("".strip) to get a bevy of useful information.

  2. string - strip () vs lstrip () vs rstrip () in Python - Stack Overflow

    lstrip, rstrip and strip remove characters from the left, right and both ends of a string respectively. By default they remove whitespace characters (space, tabs, linebreaks, etc)

  3. String.strip() in Python - Stack Overflow

    9 strip does nothing but, removes the the whitespace in your string. If you want to remove the extra whitepace from front and back of your string, you can use strip. The example string …

  4. python - How to use text strip () function? - Stack Overflow

    Please do not ask questions that are easily addressed by reading the docs. You are expected to have done some research, and looking at documentation for some method you don't …

  5. Python strip with \n - Stack Overflow

    Feb 19, 2012 · 37 The strip() method removes whitespace by default, so there is no need to call it with parameters like '\t' or '\n'. However, strings in Python are immutable and can't be modified, …

  6. python - Why doesn't .strip () remove whitespaces? - Stack Overflow

    The large majority of the questions I answer, I do so using SO! Maybe SO should make available a JFGI flag for noobs? Ha! Anyway, thanks for the explanation, appreciate it. strip doesn't …

  7. python - How do I trim whitespace? - Stack Overflow

    Is there a Python function that will trim whitespace (spaces and tabs) from a string? So that given input " \\t example string\\t " becomes "example string".

  8. Python strip method - Stack Overflow

    Feb 1, 2013 · You are misunderstanding what .strip() does. It removes any of the characters found in the string you pass. From the str.strip() documentation: The chars argument is a …

  9. python - How can I remove a trailing newline? - Stack Overflow

    An example in Python's documentation simply uses line.strip(). Perl's chomp function removes one linebreak sequence from the end of a string only if it's actually there.

  10. python - What exactly does the strip () command do? Example …

    I have the following code, and have extracted the text only, getting rid of the tags, using .text. Tutorials and documentation suggest using .strip as well, but I cannot see the difference. What …