Skip to main content
6 of 6
deleted 16 characters in body

most people here are using things not thaught in the book such as join, join should not be used to solve this question. The answer could be:

if len(spam) == 1:
    print(spam[0])
else:
    for i in range(len(spam)-1):
        print(spam[i], end=', ')
print('and', spam[-1])

if your list is always >1 you can skip the if/else statement