0

Reverse

sqs = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] print(sqs[::-6])

10th Jun 2019, 8:14 AM
Bharat Narayana
Bharat Narayana - avatar
5 Answers
+ 3
To reverse it you do sqs[::-1]
10th Jun 2019, 8:16 AM
Trigger
Trigger - avatar
+ 1
Reverse sqs = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] print(sqs[::-1])
10th Jun 2019, 9:19 AM
Bharat Narayana
Bharat Narayana - avatar
+ 1
đŸ‘đŸŒ
10th Jun 2019, 9:36 AM
Trigger
Trigger - avatar
+ 1
print([sqs[i] for i in range(len(sqs)-1, -1, -1)]) 😃
10th Jun 2019, 12:17 PM
Choe
Choe - avatar
0
sqs.reverse()
10th Jun 2019, 11:49 AM
Seb TheS
Seb TheS - avatar