Report Bug

Qus: <p>What will be the output of the following Python code? </p><pre>example = "NITIN" print(example.rfind("N"))</pre>

Qus<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">example = "NITIN" print(example.rfind("N"))</pre>


A. -1
B. 4
C. 3
D. 1


Solution
B. 4



Explanation
<p><span style="font-size: 14px;">The rfind() method is used with strings to find the highest (rightmost) index of a substring.</span></p><p><span style="font-size: 14px;">If the substring is not found, it returns -1.</span></p>
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test , CCC MCQ Python Coding Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Website development Company in Allahabad