MCQ Answer

<p>What will be the output of the following Python code snippet?</p><pre>for i in [1, 2, 3, 4][::-1]:<br>&nbsp; &nbsp; print (i)</pre><div><br></div>

What will be the output of the following Python code snippet?

for i in [1, 2, 3, 4][::-1]:
    print (i)



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

for i in [1, 2, 3, 4][::-1]:
    print (i)
Topic : Sequence data types in python

A. 1 2 3 4

B. 4 3 2 1

C. error एरर

D. none of the mentioned उल्लेखित कोई नहीं




Correct Answer is :

B. 4 3 2 1



Explanation
[::-1] reverses the list.
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