len is used to store length of the linked list tmp will point to the last node after this loop
tmp = head NEW_LINE len = 1 NEW_LINE while ( tmp . next != None ) : NEW_LINE INDENT tmp = tmp . next NEW_LINE len += 1 NEW_LINE DEDENT