fIn = 'TreeDistri.txt'
fOut = 'TreeDistri_sort.txt'

fdIn = open(fIn, 'r')
fdOut = open(fOut, 'w')

for line in fdIn:
    tmp = line.split()
    myList = []
    for i in tmp: myList.append(float(i))
    myList.sort(reverse=True)
    for i in myList: fdOut.write(str(i) + '\t')
    fdOut.write('\n')
fdIn.close()
fdOut.close()

