From 4e41c46787e7c292669456275bbc308732dfacb8 Mon Sep 17 00:00:00 2001 From: Josh Mudge Date: Fri, 1 Feb 2019 21:56:22 -0700 Subject: [PATCH] Cuts under $30 --- Codecademy.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Codecademy.md b/Codecademy.md index de19028..06e8a74 100644 --- a/Codecademy.md +++ b/Codecademy.md @@ -314,6 +314,11 @@ print(squares) print(cubes) ``` + +# For example, printing all cuts under $30 +``` +cuts_under_30 = [hairstyles[i] for i in range(0, (len(hairstyles) - 1)) if new_prices[i] < 30] +``` ## Ranges You can get a range of numbers using `range()`