-
Notifications
You must be signed in to change notification settings - Fork 2
Home
porry edited this page Dec 14, 2017
·
7 revisions
a_list = [5, 2, 9, 190, 1]
print(sorted(a_list)) print(sorted(a_list, reverse = True)) print(a_list)
a_list.sort() print(a_list)
a_list.reverse() print(a_list)
a_list = [5, 2, 9, 190, 1] a_list.sort(reverse = True) print(a_list)
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.
================= RESTART: C:/Users/porry/Desktop/test.py ================= [1, 2, 5, 9, 190] [190, 9, 5, 2, 1] [5, 2, 9, 190, 1] [1, 2, 5, 9, 190] [190, 9, 5, 2, 1] [190, 9, 5, 2, 1]