CBSE Class 11 Computer Science
Question 110 of 161
Flow of Control — Question 19
Back to all questions 19
Question Question 11e
Predict the output of the following code fragments:
for x in [1,2,3,4,5]:
print (x)Answer
Output
1
2
3
4
5
Explanation
x will be assigned each of the values from the list one by one and that will get printed.