Learn practical skills, build real-world projects, and advance your career
# Q-1. What will be the output of the following code block?
a=[1,2,3,4,5,6,7,8,9]
print(a[::2])
[1, 3, 5, 7, 9]

a=[1,2,3,4,5,6,7,8,9]
a[::2]=10,20,30,40,50,60
print(a)

# Q-2. What will be the output of the following code snippet?
a=[1,2,3,4,5,6,7,8,9]
a[::2]=10,20,30,40,50
print(a)
[10, 2, 20, 4, 30, 6, 40, 8, 50]
# Q-3. What will be the output of the following code snippet?
a=[1,2,3,4,5]
print(a[3:0:-1])
[4, 3, 2]
a[:len(a)]
[1, 2, 3, 4, 5]