Strip Characters From a Python String Quiz - Real Python
Briefly

Strip Characters From a Python String Quiz - Real Python
"Brush up on how Python's strip, lstrip, and rstrip string methods work. You'll practice how to remove whitespace, specific characters, and use the right tool for trimming string ends."
"Try these questions to check your understanding of default stripping, custom character sets, and the difference between stripping characters and removing sequences. Need a refresher? See Strip Characters From a Python String."
"The quiz contains 10 questions and there is no time limit. You'll get 1 point for each correct answer. At the end of the quiz, you'll receive a total score. The maximum score is 100%. Good luck!"
Strip, lstrip, and rstrip remove characters from the ends of strings. The default behavior removes whitespace characters. Supplying an argument defines a set of characters to remove, not a substring sequence. Character-based stripping removes any of the listed characters from ends until a non-matching character appears. Choosing between strip, lstrip, and rstrip controls whether both ends, the left, or the right end are trimmed. A 10-question quiz tests these concepts with no time limit, awarding one point per correct answer for a maximum score of 100%.
Read at Realpython
Unable to calculate read time
[
|
]