Report Bug

Qus

What will be the output of the following Python code?

example = "NITIN"
print(example.rfind("N"))
Qus

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

example = "NITIN"
print(example.rfind("N"))


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>
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad