import random


def new_path(existing_path):
    """Switch two random consecutive points on a path

    Arguments received:
    existing_path -- list of coordinates, e.g. [(0, 0), (10, 5), (10, 10)], representing a path

    Arguments returned:
    path -- list of coordinates representing the mutated path
    """
    path = existing_path[:]
    point = random.randint(0, len(path)-2)  # randomly choose a point between 1st and 2nd-to-last points on path
    path[point+1], path[point] = path[point], path[point+1]  # switch this point with the next point
    return path