def square(x):
return(x**2)
squares = [ ]
squares= list(filter(square, range(1, 11)))
print("List of squares in the range 1-10 =", squares)
Sum= 0
for i in squares:
Sum+=i
print("Sum of squares in the range 1-10 = ", sum)
To embed this project on your website, copy the following code and paste it into your website's HTML: