“Ring List Element” Kod odpowiedzi

Ring List Element

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

Ring List Element

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
Joker

Ring List Element

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

Ring List Element

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

aList2 = sort(aList,1)
see aList2
Joker

Odpowiedzi podobne do “Ring List Element”

Pytania podobne do “Ring List Element”

Więcej pokrewnych odpowiedzi na “Ring List Element” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu