Question 11 Mark
Write a Python program to select the even items of a list.
Answer
View full question & answer→# filename:ch-datas-P_Q4
x = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(x[1::2])
25 questions · timed · auto-graded
x = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(x[1::2])
What is the output of the following code?
What is the output of the following code?
Which is the correct output for the following code?
(a) LST as Stack (b) LST as Queue
LST = [8,10,7,9,15,12]
(b) LST as Queue
LST = [10,7,9,15,12,8]