-1

How would I make the following display center and underlined in the shell (if I can)

print ("Award show",datetime.date.today().strftime("%Y"))
SCB
  • 5,821
  • 1
  • 34
  • 43
Joe Walsh
  • 19
  • 1
  • Idk if you can underline ik you can add spaces to the front to make it centered – mgracer Feb 13 '18 at 21:31
  • When you start asking questions like this, you'll probably want to look at a tool like [curses](https://docs.python.org/3/howto/curses.html) (or one of it's many simpler counterparts). An answer for which is probably out of scope here. – SCB Feb 13 '18 at 21:32
  • 1
    Possible duplicate of [How do I print something underlined in Python?](https://stackoverflow.com/questions/35401019/how-do-i-print-something-underlined-in-python) – mgracer Feb 13 '18 at 21:36
  • Can your shell print underlined text? Can you determine its width in characters? – Jongware Feb 13 '18 at 22:05

1 Answers1

0

First you would need to add this code

print  '  ' +   '\033[4m' + 'Text here' +  '\033[0m'

first part is to add spaces,

second part is making it underline,

3rd part is text 4th part is end of the whole thing

Then to center just add spaces to the first

mgracer
  • 175
  • 1
  • 11