From bfef8d1013e94382058da184ebb6479a800d5857 Mon Sep 17 00:00:00 2001 From: Josh Mudge Date: Tue, 29 Jan 2019 18:23:28 -0700 Subject: [PATCH] Manipulate lists with list comprehensions. --- Codecademy.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Codecademy.md b/Codecademy.md index 30ff049..99c34fa 100644 --- a/Codecademy.md +++ b/Codecademy.md @@ -294,6 +294,12 @@ can_ride_coaster = [height for height in heights if height > 161] print(can_ride_coaster) ``` +You can manipulate lists with list comprehensions as well: + +``` +fahrenheit = [celsius * (9 / 5) + 32 for celsius in celsius] +``` + ## Ranges You can get a range of numbers using `range()`