Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

ring Sort List Item

Sort(List) ---> Sorted List
Sort(List,nColumn) ---> Sorted List based on nColumn
Sort(List,nColumn,cAttribute) ---> Sorted List based on Object Attribute
Comment

ring Sort List Item

aList = [10,12,3,5,31,15]
aList = sort(aList) see aList # print 3 5 10 12 15 31
Comment

ring Sort List Item

mylist = ["mahmoud","samir","ahmed","ibrahim","mohammed"]
see mylist                # print list before sorting
mylist = sort(mylist)     # sort list
see "list after sort"+nl
see mylist                # print ahmed ibrahim mahmoud mohammed samir
Comment

ring Sort List Item

aList = [ ["mahmoud",15000] ,
          ["ahmed", 14000 ] ,
          ["samir", 16000 ] ,
          ["mohammed", 12000 ] ,
          ["ibrahim",11000 ] ]

aList2 = sort(aList,1)
see aList2
Comment

PREVIOUS NEXT
Code Example
Python :: ring Using Lists during definition 
Python :: ring Date and Time Clock 
Python :: ring raise an exception 
Python :: ring Using Self.Attribute and Self.Method 
Python :: update specific field in index in elastic using python 
Python :: ring get a list of functions names written in the Ring language 
Python :: how to deploy django app on heroku with mongodb 
Python :: loop over dict python looking for match in list 
Python :: notebook prevent cell output 
Python :: All objects and constants needed to use the ldap3 library can be imported from the ldap3 namespace 
Python :: cuantas palabras hay en una frase en python 
Python :: webdriver antibot 
Python :: what is primary key in python 
Python :: downloading datasets from ml.org repository 
Python :: matplotlib pie chart move autotext 
Python :: dbscan multidimensional data 
Python :: How printe word in python 
Python :: default python structure 
Python :: how to assign a value to a key dictionary in a list python 
Python :: text replace 
Python :: pyglet key hold 
Python :: find root of the path of file os package 
Python :: check if a variable is empty python 
Python :: insert string into middle of list python 
Python :: df.isna percentage 
Python :: Add extra data to Django notifications model object (extend the notify signal) 
Python :: custom save method django 
Python :: python threadpool map exception 
Python :: write python code in ansible 
Python :: symmetric_difference_update() Function of sets in python 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =