QuestionQ33

VerifiedMiscellaneous (List Comprehensions, Lambdas, Closures, I/O)

Which of the following calls are valid?

Choose two
Explanation

Python’s str type supports both rindex() and find(). rindex("th") returns the index of the last matching substring, while find("") is valid and returns 0 because the empty string occurs at the start of every string.

Community Discussion

No comments yet. Be the first to start the discussion!