QuestionQ33Verified/Miscellaneous (List Comprehensions, Lambdas, Closures, I/O)Copy linkReport a problemAsk AstroTutorSave questionWhich of the following calls are valid?Choose twoA'python'.sorted()B"python".rindex("th")Csort("python")D"python".find("")Show AnswerAnswerExplanationPython’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.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion