我正在使用Python 2.5和Win XP.我有一个元组如下:
>>> a (None, '{1: 2, 2: 4, 3: 6, 4: 8, 5: 10, 6: 12}') >>> a[1] '{1: 2, 2: 4, 3: 6, 4: 8, 5: 10, 6: 12}' >>>
我想将元组[1]转换为字典,因为我想使用键和值.请帮忙提出建议.TQ
python dictionary tuples
dictionary ×1
python ×1
tuples ×1