Completed 4-9 Cube Comprehension

This commit is contained in:
cheeks 2025-01-21 12:57:22 -05:00
parent 12d60b76bb
commit 0f9e39a6d2

View File

@ -0,0 +1,7 @@
# Exercise 4-9 Cube Comprehension
# Learning Objective: Use List Comprehension to create list of first 10 cubes.
cubes = [value**3 for value in range(1, 11)]
print(cubes)
# Unbenownst to me, I had done that already in 4-8.