Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Return a sorted copy of the list. Does not modify original list.

li = [1,9,2,3]

li2 = sorted(li)

print(li)   # [1, 9, 2, 3]
print(li2)  # [1, 2, 3, 9]
Source by xahlee.info #
 
PREVIOUS NEXT
Tagged: #Return #sorted #copy #Does #modify #original
ADD COMMENT
Topic
Name
7+3 =