0
what is the output of the program mentioned in the question.
sqs = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] print(sqs[7:5:-1]) ## The answer is [49,36]. How will we get 36 in the answer
2 Answers
+ 3
Following the algorithm: use 6 instead of 7.
In simple use sqs[6]
0
For +ve step value [start:end-1:step]
For -ve step value
[Start: end+1: - step]