python get width and height of terminal code example
Example: get terminal size python
import os
# you can do like this
columns, lines = os.get_terminal_size()
# or
size = os.get_terminal_size()
columns = size.columns
lines = size.lines
import os
# you can do like this
columns, lines = os.get_terminal_size()
# or
size = os.get_terminal_size()
columns = size.columns
lines = size.lines