Ad
Code
Diff
  • def square(n):
        return ['*' * n for x in range(0,n)]
    • def square(n):
    • l=''
    • square1=[]
    • for i in range(n):
    • l+='*'
    • for i in range(n):
    • square1.append(l)
    • for i in range(n):
    • print(square1[i])
    • return square1
    • return ['*' * n for x in range(0,n)]