shellon wrote: > Hi all: > I want to convert the float number to sortable integer, like the > function float2rawInt() in java, but I don't know the internal > expression of float, appreciate your help! > You should know you can sort mixed float/integer values in Python >>> l=[3,2.3,1.45,2,5] >>> l.sort() >>> l [1.45, 2, 2.2999999999999998, 3, 5]
to convert a float to int use the built-in int function: >>> int(2.34) 2 Hope this helps regards Wolfgang -- http://mail.python.org/mailman/listinfo/python-list