Reverse a sub list of a linked list, with follow-ups.
Asked in the onsite coding stage. For grading, represent the singly linked list as a list of node values. Modify the list in place and return it after reversing the nodes from left through right, inclusive.
reverse_sublist(head, left, right) receives head, a non-empty list of integers, and one-based positions left and right. It returns the same list object with that contiguous sublist reversed.
def reverse_sublist(head, left, right):