Here we use map(), which generate another list of square using
list - [1,2,3,4,5,6,7,8,9,10]
li = [1,2,3,4,5,6,7,8,9,10] squaredNumbers = map(lambda x: x**2, li) print(squaredNumbers)
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
Our aim to provide top rated python program which help to learn python and improve your coding skills.
Other related topic-
If you want to learn Codersarts python program Forum then go to the this link