NIELIT O Level Exam

<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("xyyzxyzxzxyy".count('yy'))</span></pre>

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('yy'))


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

print("xyyzxyzxzxyy".count('yy'))

A. 2

B. 0

C. error एरर

D. none of the mentioned उल्लेखित कोई नहीं




Correct Answer is :

A. 2



Explanation
Counts the number of times the substring ‘yy’ is present in the given string.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad