76. Python Program to Add Items to a Shopping List
EasyAdd, remove
Overview
Grow a list with append() and insert().
Problem Statement
Start with the list ["milk", "bread"]. Read two items, one per line. Add the first item to the end of the list and the second item to the front. Then print the list and the number of items. For example, for eggs and rice:
['rice', 'milk', 'bread', 'eggs']
Items: 4
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One value per line, in this order. Example:
eggs
rice
Output
The output for that example:
['rice', 'milk', 'bread', 'eggs']
Items: 4
The tests try 3 different inputs.