"Welcome to the course of Python.".find('of', 0, 20) का output क्या होगा?
What will be the output of "Welcome to the course of Python.".find('of', 0, 20)?
A
True
B
False
C
maybe
D
None
Explanation
"Welcome to the course of Python.".find('of', 0, 20)
.find(substring, start, end)
यह method substring को दिए गए start से end index के बीच ढूंढता है।
अगर substring मिलती है, तो उसकी index return करता है,
अगर नहीं मिलती तो -1 return करता है — न कि None.
👉 इसलिए सही output होगा: -1, लेकिन यह विकल्पों में नहीं है।
🔁 Corrected Answer:
✅ None is incorrect. The actual output is -1.
Correct Answer: D) None