From 4147da1317c19fa61d6aa265e8370e63231f9207 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Sun, 19 Nov 2023 16:55:03 +0100 Subject: Initial commit --- aoc/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 aoc/utils.py (limited to 'aoc/utils.py') diff --git a/aoc/utils.py b/aoc/utils.py new file mode 100644 index 0000000..a5de050 --- /dev/null +++ b/aoc/utils.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +from typing import Callable + + +def bold(item: str, condition: Callable[[], bool]): + return f"\033[36m{item}\033[0m" if condition() else item -- cgit v1.2.3