[EMAIL PROTECTED] wrote:
def funcSort(myList):
result = myList[:]
result.sort()
return result
In Python 2.4, funcSort is called sorted:
py> sorted([1.2,1.23,4.5,2])
[1.2, 1.23, 2, 4.5]
py> sorted(["a","c","b","A","C","B"])
['A', 'B', 'C', 'a', 'b', 'c']
STeVe
--
http://mail.python.org/mailman
praba kar said unto the world upon 2005-04-11 00:50:
Dear All,
I am new to Python. I am in need of
some sorting functions (eg) numerical sorting
functions and alphapetical sorting functions.
I have searched through net But I cannot
find any regarding this so If anyone know
regarding thi
Basically you can sort after you put your data in your list:
L = [1.2,1.23,4.5,2]
L.sort()
print L
L = ["a","c","b","A","C","B"]
L.sort()
print L
Result:
[1.2, 1.23, 2, 4.5]
['A', 'B', 'C', 'a', 'b', 'c']
#
remember in character the "A"
On Mon, 11 Apr 2005 05:50:11 +0100 (BST), praba kar <[EMAIL PROTECTED]> wrote:
>Dear All,
>
> I am new to Python. I am in need of
>some sorting functions (eg) numerical sorting
>functions and alphapetical sorting functions.
>I have searched through net But I cannot
>find any regarding t
Dear All,
I am new to Python. I am in need of
some sorting functions (eg) numerical sorting
functions and alphapetical sorting functions.
I have searched through net But I cannot
find any regarding this so If anyone know
regarding this. Kindly mail me as early as possible
with regards