Задачу об автобусе верно решили:
— @max_max89;
— Sergey;
— @patriarch_chesslovo;
Кратчайшее верно решение предложил Sergey:
def find_min_distance(distances, start, destination):
full=sum(distances)
if start>destination: start, destination = destination, start
part=sum(distances[start:destination])
return min(part, full-part)
@zen_of_python