Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list square python

l1 = [1,2,3,4,5]

l2 = [x**2 for x in l1] 
l2
>>> [1,4,9,16,25]
 
PREVIOUS NEXT
Tagged: #list #square #python
ADD COMMENT
Topic
Name
4+7 =