From 0f9e39a6d21a28fe03a1320d9244b1104f03cf14 Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Tue, 21 Jan 2025 12:57:22 -0500 Subject: [PATCH] Completed 4-9 Cube Comprehension --- Chapter_04/4-9_cubeComprehension.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Chapter_04/4-9_cubeComprehension.py 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