Function for creating and linking new nodes
def push ( head , val ) : NEW_LINE INDENT new_node = Node ( val ) NEW_LINE new_node . data = val NEW_LINE new_node . next = head NEW_LINE head = new_node NEW_LINE return head NEW_LINE DEDENT