Report Bug
Qus :

What will be the output of the following Python code?

print("abcdef".find("cd"))

Qus

निम्नलिखित Python कोड का आउटपुट क्या होगा?

print("abcdef".find("cd"))


A. True
B. 2
C. 3
D. None of the mentioned


Solution
B. 2



Explanation
The first position in the given string at which the substring can be found is returned.



Report Bug