1 2 3 4 5
from typing import Callable def bold(item: str, condition: Callable[[], bool]): return f'\033[36m{item}\033[0m' if condition() else item