...

/

Solution Review: List of Cubes

Solution Review: List of Cubes

This lesson gives a detailed review of how to print a list of cubes using a list comprehension.

Solution1: List Comprehension

As we have already seen in the previous exercise, list comprehensions allow for in-place list creation using a range that mathematical operations can be done on. This solution uses the same approach; we can simply use a list comprehension that ...