I don't know if this is efficient as others but simple logic always works:
import sys
name = ["Sam", "Peter", "James", "Julian", "Ann"]
for i in range(0, len(names)):
sys.stdout.write(names[i])
if i != len(names)-1:
sys.stdout.write(", ")
Output:
Sam, Peter, James, Julian, Ann