我对以下代码感到有点困惑:
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> list_a = ['300', '300', '200', '150', '150', '120', '1']
>>> list_b = ['butter', 'sugar', 'yolks', 'flour', 'potato_starch', 'egg_whites', 'lemon_zest']
>>> c = dict(zip(list_b, list_a))
>>> print c
>>>{'butter': '300', 'lemon_zest': '1', 'flour': '150', 'egg_whites': '120', 'sugar': '300', 'yolks': '200', 'potato_starch': '150'}
>>> c = dict(zip(list_a, list_b))
>>> print c
>>>{'300': 'sugar', '200': 'yolks', '1': 'lemon_zest', '120': 'egg_whites', …Run Code Online (Sandbox Code Playgroud)