Answers for "output the squares of all the numbers in a list L = [1, 2, 3, 4]?"

0

python square all numbers in list

def square(list):
    return [i ** 2 for i in list]
Posted by: Guest on July-24-2020
0

list comprehension with square numbers python

def square(a):
    squares = []
    for i in a:
        squares.append(i**2)
    return squares
Posted by: Guest on August-21-2020

Code answers related to "output the squares of all the numbers in a list L = [1, 2, 3, 4]?"

Python Answers by Framework

Browse Popular Code Answers by Language