Question
Write a Python program to select the even items of a list.

Answer

# filename:ch-datas-P_Q4

x = [1, 2, 3, 4, 5, 6, 7, 8, 9]

print(x[1::2])

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free