human_list¶
- asdf.util.human_list(line, separator='and')[source]¶
Formats a list for human readability.
- Parameters:
- lsequence
A sequence of strings
- separatorstring, optional
The word to use between the last two entries. Default:
"and"
.
- Returns:
- formatted_liststring
Examples
>>> human_list(["vanilla", "strawberry", "chocolate"], "or") 'vanilla, strawberry or chocolate'