# to input the names of animals(max is 3 names)
i=1
animals=[]
while i<=5:
y=input('animal{}name'.format(i))
animals.append(y)
i+=1
if y=='only':
break
print('your animals are ',animals)
i=1
while i<=len(animals):
weight1=int(input('weight for {}'.format(animals[0])))
speed1=int(input('speed for {}'.format(animals[0])))
food_consumption1=int(input('food consumption for{}'.format(animals[0])))
i+=1
if i>len(animals):
break
weight2=int(input('weight for {}'.format(animals[1])))
speed2=int(input('speed for {}'.format(animals[1])))
food_consumption2=int(input('food consumption for{}'.format(animals[1])))
i+=1
if i>len(animals):
break
weight3=int(input('weight for {}'.format(animals[2])))
speed3=int(input('speed for {}'.format(animals[2])))
food_consumption3=int(input('food consumption for{}'.format(animals[2])))
speed_list=[speed1,speed2,speed3]
speed_list.sort(inverse=true)
now after arranging the speed of animals in a list from highspeed to low speed i need a code to allow me to arrange the animals names from fastest animal to slowest animal