Reverse | Sololearn: Learn to code for FREE!

0

Reverse

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

6/10/2019 8:14:04 AM

Bharat Narayana

5 Answers

New Answer

+3

To reverse it you do sqs[::-1]

+1

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

+1

👍🏼

+1

print([sqs[i] for i in range(len(sqs)-1, -1, -1)]) 😃

0

sqs.reverse()