From 524f9f79ae11d6797bf168c552e119dbbb7b5477 Mon Sep 17 00:00:00 2001 From: jay817 Date: Fri, 27 Sep 2024 10:51:33 -0400 Subject: [PATCH] Update color/README.md --- color/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/color/README.md b/color/README.md index 1492943..4237272 100644 --- a/color/README.md +++ b/color/README.md @@ -1,5 +1,5 @@ ```python -globals().update({color: lambda text, ansi=ansi: f'\x1b[{ansi}m{text}\x1b[0m' - for color, ansi in zip("red green yellow blue magenta cyan".split(), range(91, 97))}) -print(red('hello')) +globals().update({color: lambda text, ansi=91+i: f'\x1b[{ansi}m{text}\x1b[0m' + for i, color in enumerate('red green yellow blue magenta cyan'.split())}) +print(red('hello'), green('world')) ``` \ No newline at end of file