Report Bug
Qus :

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('xyy', 2, 11))

Qus

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

print("xyyzxyzxzxyy".count('xyy', 2, 11))


A. 2
B. 0
C. 1
D. error


Solution
B. 0



Explanation
Counts the number of times the substring ‘xyy’ is present in the given string, starting from position 2 and ending at position 11.



Report Bug