SyntaxFix
Write A Post
Hire A Developer
Questions
You can do something like this:
a = [1,2,3,4,5] b = [i**2 for i in a]
It's called a list comprehension, to make it easier for you to loop inside a list.