From e36e57a6d6529b921fe592e3c8a1da613e281110 Mon Sep 17 00:00:00 2001 From: PalNilsson Date: Tue, 19 Nov 2024 15:27:15 +0100 Subject: [PATCH] Added list_items() --- pilot/util/auxiliary.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pilot/util/auxiliary.py b/pilot/util/auxiliary.py index ddcd8547..9f687e79 100644 --- a/pilot/util/auxiliary.py +++ b/pilot/util/auxiliary.py @@ -839,3 +839,13 @@ def uuidgen_t() -> str: :return: A UUID in the format "00000000-0000-0000-0000-000000000000" (str). """ return str(uuid4()) + + +def list_items(items: list): + """ + List the items in the given list as a numbered list. + + :param items: list of items (list) + """ + for i, item in enumerate(items): + logger.info(f'{i + 1}: {item}')