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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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"
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply