python:python-dictionary-comprehension
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| python:python-dictionary-comprehension [2018/06/15 19:19] – created aistis | python:python-dictionary-comprehension [2018/06/15 19:20] (current) – aistis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| python-dictionary-comprehension | python-dictionary-comprehension | ||
| + | |||
| + | https:// | ||
| < | < | ||
| Line 11: | Line 13: | ||
| </ | </ | ||
| + | < | ||
| dict1_keys = {k*2:v for (k,v) in dict1.items()} | dict1_keys = {k*2:v for (k,v) in dict1.items()} | ||
| print(dict1_keys) | print(dict1_keys) | ||
| {' | {' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | c2 = {k: | ||
| + | |||
| + | c2 = {k: | ||
| + | |||
| + | </ | ||
python/python-dictionary-comprehension.1529079599.txt.gz · Last modified: by aistis
