title: What does end=' ' exactly do?
body: <p>So, I'm struggling trying to understand this kinda simple exercise</p>
  
  <pre><code>def a(n):
      for i in range(n):
          for j in range(n):
              if i == 0 or i == n-1 or j == 0 or j == n-1:
                  print('*',end='')
              else:
                  print(' ',end='')
          print()
  </code></pre>
  
  <p>which prints an empty square. I tought I could use the code</p>
  
  <pre><code>            print("*", ''*(n-2),"*")
  </code></pre>
  
  <p>to print the units in between the upper and the lower side of the square but they won't be aligned to the upper/lower side ones, which doesn't happen if you run the first code... so... could this be because of <code>end=''</code> or <code>print()</code> (would you be so kind and tell me what do they mean?)?</p>