long = int(input("longueur : "))
larg = int(input("largeur : "))
for i in range(larg):
if i == 0 or i == larg - 1:
for j in range(long):
print("* ", end="")
print()
else:
for j in range(long):
if j == 0 or j == long - 1:
print("* ", end="")
else:
print(end=" ")
print()
I was trying to achieve a rectangle shape through symbols .
I started learning Python recently and I'm searching for a faster/cleaner way to do this .
the output requested is:
* * * *
* *
* * * *