On 9 Juli, 22:25, Michiel Overtoom <[EMAIL PROTECTED]> wrote:
> Paul & Robert wrote...
> > d = ["soep", "reeds", "ook"]
> >print ', '.join(d)
> > soep, reeds, ook
>
> I occasionally have a need for printing lists of items too, but in the form:
> "Butter, Cheese, Nuts and Bolts". The last separator
Michiel Overtoom <[EMAIL PROTECTED]> wrote:
> I occasionally have a need for printing lists of items too, but in the
> form: "Butter, Cheese, Nuts and Bolts". The last separator is the
> word 'and' instead of the comma. The clearest I could come up with in
> Python is below. I wonder if there is
On Wed, Jul 09, 2008 at 10:25:33PM +0200, Michiel Overtoom wrote:
> Formatting a sequence of items such that they are separated by
> commas, except the last item, which is separated by the word 'and'.
>
> For example:
>
> Three friends have a dinner: Anne, Bob and Chris
row = ["Anne","Bob","Chri
Michiel Overtoom wrote:
Paul & Robert wrote...
d = ["soep", "reeds", "ook"]
print ', '.join(d)
soep, reeds, ook
I occasionally have a need for printing lists of items too, but in the form:
"Butter, Cheese, Nuts and Bolts". The last separator is the word 'and'
instead of the comma. The cleare
Paul & Robert wrote...
> d = ["soep", "reeds", "ook"]
>print ', '.join(d)
> soep, reeds, ook
I occasionally have a need for printing lists of items too, but in the form:
"Butter, Cheese, Nuts and Bolts". The last separator is the word 'and'
instead of the comma. The clearest I could come up with