Draw a box around message line
<p>I asked this question earlier, but the answer I received ended up not working correctly so I started over completely. I now have more developed code but still can't figure out whats wrong and how to surround a and hello in a box like so:</p>

<p><a href="https://i.stack.imgur.com/WdHnA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WdHnA.png" alt="Example"></a></p>

<p>The original question was: Given a message that may contain multiple lines, utilize the split() function to identify the individual lines, and use either of the formatting approaches we've learned as part of your solution to create the string that, when printed, draws a box around the message's lines, all centered. The box uses vertical bars and dashes on the sides (|, -), plusses in the corners (+), and there is always a column of spaces to the left and right of the widest line of the message. All lines are centered. </p>

<p>Here is the code I've come up with. I think it's on the right track but I'm getting errors especially with the ver function</p>

<pre><code>def border_msg(msg):
    count=len(msg)
    for i in range(0,len(msg)):
        count+=1

    count = count
    dash="-"
    for i in range (0,count+1):
        dash+="-"
    h="{}{}{}".format("+",dash,"+")

    count=count+2

    ver="{}{:^'count'}{}".format("|",msg,"|")
    print (ver)

print(border_msg('a'))
print(border_msg("hello"))
</code></pre>