Join a list with commas and 'and'.
Given spam = ['apples', 'bananas', 'tofu', 'cats'], print: apples, bananas, tofu, and cats
(For a single-item list, just print it. For two items: "a and b".)
This is the classic ATBS Chapter 4 exercise.
Sign in to save your code and track progress across devices.