您可以在Python 2.x中这样做:
>>> l = ((1,2),(3,4))>>> dict(map(lambda n: (n[0], unipre(n[1])), l)){1: u'2', 3: u'4'}或在Python 3.x中:
>>> l = ((1,2),(3,4))>>> {n[0] : str(n[1]) for n in l}{1: '2', 3: '4'}请注意,Python 3中的字符串与Python 2中的unipre字符串相同。

您可以在Python 2.x中这样做:
>>> l = ((1,2),(3,4))>>> dict(map(lambda n: (n[0], unipre(n[1])), l)){1: u'2', 3: u'4'}或在Python 3.x中:
>>> l = ((1,2),(3,4))>>> {n[0] : str(n[1]) for n in l}{1: '2', 3: '4'}请注意,Python 3中的字符串与Python 2中的unipre字符串相同。