🚀 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?

str1="helloworld" 
str1[::-1]
A)
B)
C)
D)

Explanation:

The code str1[::-1] reverses the string str1.

Explanation:

  • str1 = "helloworld"
  • The slice notation [::-1] reverses the string.

So, "helloworld"[::-1] becomes "dlrowolleh".

The correct answer is:

(A) dlrowolleh.

Latest Updates