Consider the statements given below and then choose the correct output from theनीचे दिये गए स्टैटमेंट्स (Statements ) पर विचार कीजिए और दिये गये विकल्पों में से सही आउटपुट
Consider the statements given below and then choose the correct output from the
given options :
L=['TIC' , 'TAC' ]
print (L[::-1])
नीचे दिये गए स्टैटमेंट्स (Statements ) पर विचार कीजिए और दिये गये विकल्पों में से सही आउटपुट
(Output) चुनिये :
L=['TIC' , 'TAC' ]
print (L[::-1])
Show answerHide answer
Correct answer: (D) ['TAC' , 'TIC' ]['TAC' , 'TIC' ]
Explanation
L[::-1] reverses the list's order but not the strings inside it, so it prints ['TAC', 'TIC'].L[::-1] सूची का क्रम उलटता है, पर उसके भीतर की स्ट्रिंग नहीं, इसलिए यह ['TAC', 'TIC'] प्रिंट करता है।