Already good answers available. This one works in all test cases and is slightly different than some others.
def grammar_join(words):
return reduce(lambda x, y: x and x + ' and ' + y or y,
(', '.join(words[:-1]), words[-1])) if words else ''
tests = ([], ['a'], ['a', 'b'], ['a', 'b', 'c'])
for test in tests:
print grammar_join(test)
a
a and b
a, b and c