Robotics & Artificial Intelligence

Write a Python program to generate the square of all the elements of a list.

Python List Manipulation

2 Likes

Answer

numbers = [2, 3, 4, 5, 7]
for i in numbers:
    print(i * i)

Output

4
9
16
25
49

Answered By

1 Like


Related Questions