No loops, no joins, just two print statements:
def commalist(listname):
print(*listname[:-1], sep = ', ',end=", "),
print('and',listname[-1])
the end parameter in the first print will determine whether to use oxford comma.
No loops, no joins, just two print statements:
def commalist(listname):
print(*listname[:-1], sep = ', ',end=", "),
print('and',listname[-1])
the end parameter in the first print will determine whether to use oxford comma.