Advertisement
Mili-NT

pyOxfordCommaConverter

Dec 24th, 2021
1,083
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. def list_to_oxford_format(array, conjunction="and"):
  2.     return f"{', '.join(array[:-1])}, {conjunction} {array[-1]}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement