+ 1

How to use "list.reverse()"?

How does it works?

18th Sep 2016, 3:37 PM
Wætrb4II
Wætrb4II - avatar
4 Réponses
+ 7
num= [1, 2, 3, 4, 5] print(num) num.reverse() print(num)
18th Sep 2016, 4:50 PM
Edward Quintero
Edward Quintero - avatar
+ 3
Thanks!
18th Sep 2016, 4:52 PM
Wætrb4II
Wætrb4II - avatar
+ 2
my_list = [1,2,3,4,5] print (my_list.reverse ()) [5,4,3,2,1]
18th Sep 2016, 4:38 PM
Luke Armstrong
+ 2
Thank you! So I can use everything instead of "list"?
18th Sep 2016, 4:47 PM
Wætrb4II
Wætrb4II - avatar