diff --git a/Chapter_04/4-9_cubeComprehension.py b/Chapter_04/4-9_cubeComprehension.py new file mode 100644 index 0000000..779aa96 --- /dev/null +++ b/Chapter_04/4-9_cubeComprehension.py @@ -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. \ No newline at end of file