How do i make this pattern from user input using a for loop (i want my code to be able to produce the output on the bottom)

Size = int(input("what is the size of the box "))

def Stars(Size):
  for x in range(0, Size):
    for y in range(0, Size):
      print("*",end="")
Stars()
OUTPUT (if the size of the box was 4)
        ****
        *==*
        *==*
        ****

for the first and last line, they should be outside the loop. Then you can create the loop normally,

def stars(x):
    print('*'*x)
    for i in range(1,x-1):
        print('*'+'='*(x-2)+'*')
    print('*'*x)

stars(4)