Resultant project workflows may process items in linked order. Given the head of a singly linked list, reverse the list in place using iteration and return the new head.
The input is head, either None or a reference to a ListNode with fields val and next. The function must return the new head after reversing every next pointer. Do not create new list nodes. For examples and test cases, linked lists are represented as arrays of values, where [] represents None.
def reverse_linked_list(head):