title: I can't get the desired ouput with print and str.center
body: <p>I have been trying to print a designer door mat but I can't get the desired result. The mat should only contains these <strong>| , - , .</strong> special chars.
  Here N is number of rows where as M is width of it. In between it should print Welcome.</p>
  
  <p>My Code:</p>
  
  <pre><code>N, M = 4, 12
  for i in range(1, N, 2):
      print(str(".|." * i).center(M, '-'))
  print("WELCOME".center(M, '-'))
  for i in range(N-2, -1, -2):
      print(str(".|." * i).center(M,"-"))
  </code></pre>
  
  <p>My result:</p>
  
  <pre><code>----.|.-----
  -.|..|..|.--
  --WELCOME---
  ---.|..|.---
  ------------
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>----.|.-----
  -.|..|..|.--
  --WELCOME---
  -.|..|..|.--
  ----.|.-----
  </code></pre>