Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
3

How do I align text?

the_homie_me
the_homie_me

I've been trying to find the width of my screen, but nothing seems to work, How can I find it?

3 years ago

Voters

Comments

TopNew
1
Vandesm14
Vandesm14

I assume you mean the width of the terminal. For that, just do:

import os rows, columns = os.popen('stty size', 'r').read().split()
3 years ago
Load more