Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Array sort in python

import array
 
# Declare a list type object
list_object = [3, 4, 1, 5, 2]
 
# Declare an integer array object
array_object = array.array('i', [3, 4, 1, 5, 2])
 
print('Sorted list ->', sorted(list_object))
print('Sorted array ->', sorted(array_object))
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #Array #sort #python
ADD COMMENT
Topic
Name
5+2 =