This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/lib/utils/ui.py
2019-02-25 19:43:33 +01:00

8 lines
208 B
Python

"""passbook UI utils"""
def human_list(_list) -> str:
"""Convert a list of items into 'a, b or c'"""
last_item = _list.pop()
result = ', '.join(_list)
return '%s or %s' % (result, last_item)