Example 1 :
The program is to output a list elements in a specific format.
To complete the program
* Create a module named h03_01.py from the directory hw
* Record your name, class number, and date of creation.
* Create a list contains the following shopping item: 'apples'
* Add three other items to the list: 'bananas', 'tofu', and 'milk'.
* Print list as a string with all the shopping items separated by a comma, a whitespace and a “and” before the last item: “apples, bananas, tofu, and milk”
Paste the captured screen here
shoppingItems = ['apple']
shoppingItems.append('bananas')
shoppingItems.append('tofu')
shoppingItems.append('milk')
print(', '.join(shoppingItems[0:-1]) + ', and ' + shoppingItems[-1])

Please upvote, as i have given the exact answer as asked in
question. Still in case of any concerns in code, let me know in
comments. Thanks!
Example 1 : The program is to output a list elements in a specific format. To...