Question: Strings beverage _ choices and new _ choice are read from input. Perform the following tasks: Split beverage _ choices into tokens using a comma
Strings beveragechoices and newchoice are read from input. Perform the following tasks:
Split beveragechoices into tokens using a comma as the separator and assign beveragelist with the result.
Replace the first element in beveragelist with newchoice.Jump to level
Strings beveragechoices and newchoice are read from input. Perform the following tasks:
Split beveragechoices into tokens using a comma as the separator and assign beveragelist with the result.
Replace the first element in beveragelist with newchoice.
Click here for example
Ex: If the input is:
coffee, chocolate,moka, coke
chai
then the output is:
chai 'chocolate', 'moka', 'coke'
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
