title: Hour Glass in Python
body: <p>I'm trying to code an hour glass in python with the following format:</p>
  
  <blockquote>
    <p>Sample Input = 3</p>
  </blockquote>
  
  <pre><code>Sample Output: 
  
  1 0 2 0 3
  0 2 0 3 0
  0 0 3 0 0
  0 2 0 3 0
  1 0 2 0 3 
  </code></pre>
  
  <blockquote>
    <p>My code:</p>
  </blockquote>
  
  <pre><code>#for input use:
  inputString = int(input())
  # For uper half
  for i in range(1,inputString):
      # printing i zeroes at the 
      # beginning of each row
  
      for j in range(1,i):
          print("0",end=" ")
      for k in range(i,inputString+1):
          print(k,"0",end=" ")
      print()
  # For lower half
  for i in range(inputString , 0, -1):  
  
          # printing i spaces at the 
          # beginning of each row 
          for j in range(1, i): 
              print("0", end = " ") 
  
          # printing i to rows value 
          # at the end of each row 
          for k in range(i, inputString + 1): 
              print(k,"0",end = " ") 
  
          print() 
  
  My Output:
  
  1 0 2 0 3 0 
  0 2 0 3 0 
  0 0 3 0 
  0 2 0 3 0 
  1 0 2 0 3 0
  </code></pre>
  
  <p>I experimented with the looping parameters but I'm not able to figure it out. But unfortunately i couldn't. </p>
  
  <p>Please provide some inputs. </p>