earlier but uses list comprehensionsquares py squares [value** for value in range( , )print(squaresto use this syntaxbegin with descriptive name for the listsuch as squares nextopen set of square brackets and define the expression for the values you want to store in the new list in this example the expression is value** which raises the value to the second power thenwrite for loop to generate the numbers you want to feed into the expressionand close the square brackets the for loop in this example is for value in range( , )which feeds the values through into the expression value** notice that no colon is used at the end of the for statement the result is the same list of square numbers you saw earlier[ it takes practice to write your own list comprehensionsbut you'll find them worthwhile once you become comfortable creating ordinary lists when you're writing three or four lines of code to generate lists and it begins to feel repetitiveconsider writing your own list comprehensions try it yourse lf - counting to twentyuse for loop to print the numbers from to inclusive - one millionmake list of the numbers from one to one millionand then use for loop to print the numbers (if the output is taking too longstop it by pressing ctrl- or by closing the output window - summing millionmake list of the numbers from one to one millionand then use min(and max(to make sure your list actually starts at one and ends at one million alsouse the sum(function to see how quickly python can add million numbers - odd numbersuse the third argument of the range(function to make list of the odd numbers from to use for loop to print each number - threesmake list of the multiples of from to use for loop to print the numbers in your list - cubesa number raised to the third power is called cube for examplethe cube of is written as ** in python make list of the first cubes (that isthe cube of each integer from through )and use for loop to print out the value of each cube - cube comprehensionuse list comprehension to generate list of the first cubes