"""
Lecture 11 - You Try: square_list
Mutates a list by squaring each element.
"""


def square_list(L):
    """
    - L is a list of numbers
    - Mutates L by squaring each element
    - Returns None
    """
    for i in range(len(L)):
        L[i] = L[i] ** 2


# Test calls
L = [1, 2, 3, 4]
square_list(L)
print(L)    # [1, 4, 9, 16]

L2 = [5, 10]
square_list(L2)
print(L2)   # [25, 100]
