Manipulate lists with list comprehensions.

这个提交包含在:
Josh Mudge 2019-01-29 18:23:28 -07:00
父节点 65264ff543
当前提交 bfef8d1013

查看文件

@ -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()`