Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following Python code?
print(“abcdef”.find(“cd”))

What will be the output of the following Python code?
print(“abcdef”.find(“cd”))
a) true
b) 2
c) 3
d) None of the mentioned

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

Join The Discussion