diff options
| author | 2022-11-28 13:52:27 +0100 | |
|---|---|---|
| committer | 2022-11-28 13:52:27 +0100 | |
| commit | a3de698aa6b7e15e9d0974d32dc566676383bd28 (patch) | |
| tree | d8d372b8adf7c7d2ab9b8d8b7d434945a88e7e9b /aoc/utils.py | |
| download | 2022-a3de698aa6b7e15e9d0974d32dc566676383bd28.tar.gz 2022-a3de698aa6b7e15e9d0974d32dc566676383bd28.tar.bz2 2022-a3de698aa6b7e15e9d0974d32dc566676383bd28.zip | |
Initial code
Diffstat (limited to 'aoc/utils.py')
| -rw-r--r-- | aoc/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/aoc/utils.py b/aoc/utils.py new file mode 100644 index 0000000..6d794f4 --- /dev/null +++ b/aoc/utils.py | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | from typing import Callable | ||
| 2 | |||
| 3 | |||
| 4 | def bold(item: str, condition: Callable[[], bool]): | ||
| 5 | return f'\033[36m{item}\033[0m' if condition() else item | ||
