Q. What will be the output of the following code segment:


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

for i in range(0,len(myList)):

    if i%2 == 0:

           print(myList[i])


Answer :-


1
3
5
7
9


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post