<human>:  for in list except the last.
<bot>:

# Enter the item
item = 'a'

# Calling the function
print((for_in_list_except_last(list, item)))

#Example Output
# 0

#Remember to inspect code for bugs.