>>> print(' MENU '.center(80, '*')) ************************************* MENU *************************************
Please note that 80 is not the actual width of the screen. This is just an arbitrary number that I choose, because this is the usual size of the console window on Windows. If you want to determine the actual width of the screen, you can try these examples for Linux and Windows .
source share