Question 1
Consider the following code:
text = " >>> Hello, Python! <<< "
to_strip = " <>"
A = text.strip(to_strip)
B = text.lstrip(to_strip)
C = text.rstrip(to_strip)
D = text.strip()
print(A)
print(B)
print(C)
print(D)
Which of the following is the correct output?
Hello, Python!
" Hello, Python! <<< "
" >>> Hello, Python! "
>>> Hello, Python! <<<Hello, Python!
Hello, Python! <<<
>>> Hello, Python!
>>> Hello, Python! <<<Hello, Python!.
>>> Hello, Python!
Hello, Python! <<<
>>> Hello, Python! <<<>>> Hello, Python! <<<
Hello, Python! <<<
>>> Hello, Python!
Hello, Python!
