Computer Science, asked by athulyageorge26, 7 months ago

S=[x**2 for x in range(5)] print(S)​

Answers

Answered by Oreki
0

Output:

[0, 1, 4, 9, 16]

Explanation:

Squaring every term until 4 and storing it in a list i.e.

> [0², 1², 2², 3², 4²]

> [0, 1, 4, 9, 16]

Similar questions