从字典列表中仅打印1个项目的快捷方式

Mis*_*ahX 1 python

l = [
    {'bob':'hello','jim':'thanks'},
    {'bob':'world','jim':'for'},
    {'bob':'hey','jim':'the'},
    {'bob':'mundo','jim':'help'}
]

for dict in l:
    print dict['jim']
Run Code Online (Sandbox Code Playgroud)

有这样的单线或pythonic方式吗?我正在尝试检索词典列表中只有1个项目的列表

sen*_*rle 5

[d['jim'] for d in l]
Run Code Online (Sandbox Code Playgroud)

并且不要dict用作变量名.它掩盖了dict()内置功能.