N = int(input())
a = [i ** 2 for i in range(1,N+1)]
print(a)
Либо:
a = []
for i in range(1,N+1):
a.append(i**2)
def some_funk(num): arr = [] for n in range(num): arr.append((n+1)*(n+1)) return arr
N = int(input())
a = [i ** 2 for i in range(1,N+1)]
print(a)
Либо:
N = int(input())
a = []
for i in range(1,N+1):
a.append(i**2)
print(a)
def some_funk(num): arr = [] for n in range(num): arr.append((n+1)*(n+1)) return arr