added printing a bullet list from iterables
This commit is contained in:
@ -8,4 +8,11 @@ def print_bad(*args, **kwargs):
|
|||||||
return print(SYM_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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user