Multiple Choice
Based on the string sentence = '\t \n This is a test string. \t\t \n'
Which of the following statements is false?
A) There are several string methods for xe "stripping whitespace"xe "whitespace:removing"xe "removing whitespace"removing whitespace from the ends of a string. Because strings are immutable each returns a new string leaving the original unmodified.
B) The following code uses string method strip to remove the leading and trailing whitespace from sentence: sentence.strip()
C) The following code snippets first use method xe "string built-in type:lstrip"xe "lstrip string method"lstrip to remove only leading whitespace from sentence: sentence.lstrip()
Then use method xe "string built-in type:rstrip"xe "rstrip string method"rstrip to remove only trailing whitespace:
Sentence.rstrip()
D) Methods strip, lstrip and rstrip remove only leading and/or trailing spaces.
Correct Answer:

Verified
Correct Answer:
Verified
Q5: Which of the following statements a), b)
Q6: Consider this text from Shakespeare's Romeo and
Q7: Consider the following code: In [1]: s1
Q8: Which of the following statements a), b)
Q9: Which of the following statements a), b)
Q11: Which of the following statements a), b)
Q12: Which of the following statements a), b)
Q13: Which of the following statements is false?<br>A)
Q14: Which of the following statements is false?<br>A)
Q15: Which of the following statements a), b)