Edit Python blog entry to fix typo and add another map example

This commit is contained in:
eggy 2021-05-29 22:10:51 -04:00
parent cf7ba688a1
commit 7eb6a41602

View File

@ -222,6 +222,12 @@ Output:
[1, 2, 3, 4, 5]
```
It's most useful in assigning variables easily when you know the format the input will be in.
```python
a, b = (map(int, input().split()))
```
## 5. List generators
You can generate a new list using inline `for`.