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.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz