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

21st May 2020, 2:44 PM
Ummadisetty . Lakshmi Venkata Mallikarjuna
Ummadisetty . Lakshmi Venkata Mallikarjuna - avatar
2 Respuestas
+ 3
Following the algorithm: use 6 instead of 7. In simple use sqs[6]
21st May 2020, 2:50 PM
Lerninn
0
For +ve step value [start:end-1:step] For -ve step value [Start: end+1: - step]
21st May 2020, 5:55 PM
Nag