Home / MCQ Bank / Computer
Computer Lists In Python

What will be the output of the following Python code? a= [1, 2, 3, 4, 5] for i in range(1, 5): a[i-1] = a[i] for i in range(0, 5): print(a[i],end = " ")

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • 2 3 4 5 5

Related Computer Questions

What is the size of a 'long double' data type in C++? In time series analysis, what is the primary goal of "forecast error decomposition"? In time series analysis, what is the purpose of "smoothing" methods such as exponential smoothing? What will be the output of the following C++ code? #include<iostream> #include "math.h" using namespace std; double MySqrt(double d) { if (d < 0.0) throw "Cannot take sqrt of negative number"; return sqrt(d); } int main() { double d = 5; cout << MySqrt(d) << endl; } Which of these is a wrapper for simple data type char?