Hello everyone ,here we will be learning about python loops.
So syntax is quite simple as always
Let ‘s say we have a list
List = [1,2,3,6]
We need to create a new list which contains square of each member of the original
list
New_list = [x*x for x in List]
Print(New_list)
Output : [1,4,9,36]
So easy!