Updating index.md (#20547)

Describing how to get just values from a dictionary in Python 3.x
This commit is contained in:
murtazasaif
2018-10-31 11:00:52 -04:00
committed by Christopher McCormack
parent 17ffd5a721
commit ae31e8f007

View File

@ -112,3 +112,13 @@ Use **`items()`** for Python 3.x:
y 2
z 3
```
To loop over just the values in the dictionary, do this in Python 3.x:
```python
>>> for value in d.values():
... print(value)
...
1
2
3
```