• + 2 comments

    take out the square brackets [] from around the list() call. It will already return a list and asign it to the numbers variable.

    It is expecting valid list comprehension syntax.

    List comprehensions are a super cool part of python.

    # example
    
    # You can use a loop to create a list
    squares = []
    
    for x in range(10):
        squares.append(x**2)
     
    print squares
    [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
    
    # Or you can use list comprehensions to get the same result:
    squares = [x**2 for x in range(10)]
    
    print squares
    [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]