HomePython revision Tour - 2 Predict the output of the following code snippet? a = [1, 2, 3, 4, 5] print(a[3:0:-1]) 4 Comments Facebook Twitter Q. Predict the output of the following code snippet?a = [1, 2, 3, 4, 5]print(a[3:0:-1])Answer =[4, 3, 2]>>>
it will be [4, 3, 2, 1]
ReplyDeleteYou are wrong. Please run the program.
DeleteNo ,Its because zeroth index will be excluded..
DeleteCan u explain how the output is like this I mean the background mechanism details
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )