Differences
This shows you the differences between two versions of the page.
python_wiki:list_comprehensions [2018/08/03 00:46] billdozor created |
python_wiki:list_comprehensions [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== List Comprehensions ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | List comprehensions are a way to create lists based on lists. | ||
- | |||
- | They cut out a step in which you would create an intermediate list just to create a new list. | ||
- | |||
- | **Checklist** | ||
- | * Python 2 or 3 | ||
- | |||
- | ---- | ||
- | |||
- | ====== Usage ====== | ||
- | |||
- | FIXME -> Fill out list comprehension example and code. | ||
- | |||
- | Instructions here. | ||
- | <code bash> | ||
- | Execution code here | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== The Code ====== | ||
- | |||
- | <code python program-name.py> | ||
- | Program code here | ||
- | </ | ||
- | |||
- | ---- | ||