I want to center the following text using python 35 hi h
I want to center the following text using python 3.5
+---------------+
| hi! |
| how are you? |
| drive safely! |
+---------------+
Solution
str=\"hi!\";
str=\"how are you?\";
str=\"drive safely!\";
print str.center(40,\' \');
the basic syntax to get the characters to align center
