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

आउटपुट: SMTWTFS [-3:-1]

Output: SMTWTFS [-3:-1]

A)
B)
C)
D)

Explanation:

The given string is "SMTWTFS". The slice operation [-3:-1] means:

  • The index -3 refers to the 3rd element from the end, which is "T".
  • The index -1 refers to the last element, which is "S", but since the slice goes up to (but does not include) the last index, it will stop at "F" (the second-to-last element).

So, the result of "SMTWTFS"[-3:-1] is "TF".

Thus, the correct answer is:

(D) TF.

Latest Updates