Multiple Choice
Consider this text from Shakespeare's Romeo and Juliet: soliloquy = 'To be or not to be, that is the question'
Which of the following statements a) , b) or c) is false?
A) String method index searches for a substring within a string and returns the first index at which the substring is found; otherwise, a xe "ValueError exception"ValueError occurs. The following code returns 3: soliloquy.index('be')
B) String method rindex performs the same operation as index, but searches from the end of the string and returns the last index at which the substring is found; otherwise, a xe "ValueError exception"Value-Error occurs. The following code returns 3: soliloquy.rindex('be')
C) String methods find and rfind perform the same tasks as index and rindex but, if the substring is not found, return -1 rather than causing a xe "ValueError exception"Value-Error.
D) All of the above statements are true.
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Which of the following statements a), b)
Q2: Which of the following statements is false?<br>A)
Q3: Which of the following statements a), b)
Q4: Which of the following statements a), b)
Q5: Which of the following statements a), b)
Q7: Consider the following code: In [1]: s1
Q8: Which of the following statements a), b)
Q9: Which of the following statements a), b)
Q10: Based on the string sentence = '\t
Q11: Which of the following statements a), b)