Advertisement
Peaser

x, y, and z.

Mar 28th, 2016
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def comma_and_iter(s):
  2.   separ = ', '.join(s[:-1])
  3.   return "Your items are {0}, and {1}.".format(separ, s[-1])
  4.  
  5. comma_and_iter(["thing x", "thing y", "thing z"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement