Page 1 of 1

in python Ask the user to type in a grocery list. Ensure that each item in the grocery list is separated by a comma. Use

Posted: Tue Jul 05, 2022 10:26 am
by answerhappygod
in python
Ask the user to type in a grocery list. Ensure that each item inthe grocery list is separated by a comma. Usethe split command to extract each token(item) in the grocery list. Print the last item in the list.
For example, if the user enters"milk,bananas,sugar,eggs,cheese", you will need to read this into avariable, parse the contents usingthe split command and print "cheese"