« * K @lernerpython.com

Reuven M. Lerner @lernerpython.com

2026-11-18 16:30 UTC

Have a long #Python string, and want to display it nicely? With Rich's console, you can set the width or justification: from rich.console import Console c = Console() c.print(text, width=50) c.print(text, width=50, justify='full') c.print(text, width=50, justify='center')

1 picture (not shown on this phone)

3 likes, 0 reposts, 0 replies

3 Next post4 More from @lernerpython.comBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup