🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

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

What will be the output of the following Python code ?

example = “helle”
example.rfind(“e”)
A)
B)
C)
D)

Explanation:

Let's break down the code:

example = "helle"
example.rfind("e")
  • rfind() returns the highest index of the substring (in this case, "e") found in the string.
  • In the string "helle", the last occurrence of "e" is at index 4.

So, the output will be 4.

Answer: (C) 4.

Latest Updates