4 ms·
Wouldn't this work? I can't test it at the moment. print_function = lambda c: getattr(colored, c) printred = colored.print_function("red") printr
by j_baker 15y ago
Wouldn't this work? I can't test it at the moment.
print_function = lambda c: getattr(colored, c)
printred = colored.print_function("red")
printred("This prints in red")