On 12/20/06, Austin Govella <[EMAIL PROTECTED]> wrote:
Is there an easy way to output that as: "foo, bar, and twinky"
Not that we need another way but this would work as well, and it doesn't need special cases for one and two item lists but does insert the "and" (unlike most of the solutions offered): def humanize_list(list): return ", and".join(map(str, ", ".join(map(str, list)).rsplit(',',1))) -- ---- Waylan Limberg [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---