added printing a bullet list from iterables

This commit is contained in:
2020-11-03 14:00:09 +01:00
parent e0d54d5fdd
commit 9f3a036b2e

View File

@ -8,4 +8,11 @@ def print_bad(*args, **kwargs):
return print(SYM_BAD, *args, **kwargs)
def itemize(iterable, bullet=""):
if not bullet.endswith(" "):
bullet += " "
lines = (bullet + str(i) for i in iterable)
return "\n".join(lines)