Learn practical skills, build real-world projects, and advance your career
import jovian

jovian.commit()
[jovian] Attempting to save notebook.. [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/rajan-chettri01/python-hands-on-6th-june
# 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])


#2????
#no screenshot required
[1, 3, 5, 7, 9]
# i am focusing DIY
# i am focusing learn by observation.

# 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 # try removing 60 

print(a)

# in this lab we observed the expression to assign element at every
# odd positions
[10, 2, 20, 4, 30, 6, 40, 8, 50]