I'm actually struggling to understand this kind of exercise.
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()
Which gives a output of empty square. I even thought of using this code
print("*", ''*(n-2),"*")
to print the units in the middle of the upper and the lower side of the square yet they will not be adjusted to the upper/lower side ones, which doesn't occur on the off chance that you run the principal/first code... so... could this be a direct result of end='' or print() (would you be so kind and mention to me their meaning could be a little clearer.).