I'm having trouble formatting the strings below. Trying to keep the message centered with the borders, but having a hard time executing it. Below is what output I want and below that is my code I have so far. Note: I need to have a space on the left and right columns of the longest line and I need to utilize the split() func.
+---------------+
| STOP! |
| DANGER AHEAD |
| Drive Safely! |
+---------------+
def border_sign(note):
letter_count = 0
for i in note:
letter_count += 1
return "+-------+\n| {} |\n+-------+\n".format(note)
border_sign("STOP\nDANGER AHEAD\nDrive safely!")
note, and using a counter that doesn't do anything, and not doing anything withi...