Print cubes of the numbers 1 through 10 only if the cube is evenly divisible by four

Finally print that list to the console

>>> cubes_by_four = [x**3 for x in range(1,11) if x**3 % 4 == 0]
>>> print(cubes_by_four)
[8, 64, 216, 512, 1000]

It says print the list, not print each item in the list to console

Leave a Comment