so the objective of this exercise is simple but I'm stuck. The program should take a list from user input (eg. tomatoes, fish, milk, watermelons...) and print the longest word in the list. So far I'm only able to print the amount of characters in the longest word.
user_input=input("Type a list of words separated by spaces ")
string_words=user_input
words= string_words.split()
maximum_char = max(len(w)for w in words)
print("The longest word in the list has",maximum_char, "characters")
if len(words) == maximum_char:
print(words)