Demo entry 6769988

搜索

   

Submitted by anonymous on Nov 11, 2018 at 04:07
Language: Python 3. Code size: 248 Bytes.

def rankRoutes(population):
    fitnessResults = {}
    for i in range(0,len(population)):
        fitnessResults[i] = Fitness(population[i]).routeFitness()
    return sorted(fitnessResults.items(), key = operator.itemgetter(1), reverse = True)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).