This piece of python code is an example of list comprehension
lst = [ x**2 for x in [x**2 for x in range(11)]]
# [0, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 10000]
How would this be written if it was not in list comprehension?
My understanding is that the list generated is the square of the square of each number in range(11). So I understand this is how to get the first part:
lst = []
for item in range(11):
lst.append(item**2)
print(lst)
# [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
But how can I get the second part?