Currently working my way through this beginners book and have completed one of the practice projects \'Comma Code\' which asks the user to construct a program which:
This is what I did, IMO it is more intuitive...
spam = ['apples','bananas','tofu','cats'] def ipso(x): print("'" , end="") def run (x): for i in range(len(x)): print(x[i]+ "" , end=',') run(x) print("'") ipso(spam)