Question: Integer k and string plus _ one _ country are read from input. Then, four strings are read from input and stored in the list
Integer k and string plusonecountry are read from input. Then, four strings are read from input and stored in the list countryarchive. Delete the second element in countryarchive, then replace the k th element of countryarchive with plusonecountry.
Click here for example
Ex: If the input is:
Egypt
France Canada Oman Haiti
then the output is:
My favorite countries: France 'Oman', 'Egypt'
k intinput
plusonecountry input
countryarchive inputsplit
Your code goes here
printfMy favorite countries: countryarchive
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
