Computer Science

What is the output produced?

(i) >>> "whenever" .find("never")

(ii) >>> "whenever" .find("what")

Python String Manipulation

8 Likes

Answer

(i) 3
The starting index of substring "never" in "whenever" is 3.

(ii) -1
Substring "what" is not present in "whenever".

Answered By

5 Likes


Related Questions