I have one question about assigning one dictionary value to another dictionary value in python, the value contains some Chinese characters
# -*- coding: utf-8 -*-
import string
a = {}
a['1'] = '大' # chinese character
b = {}
b['1'] = a['1']
print a['1']
print a
print b
And the printout is
大
{'1': '\xe5\xa4\xa7'}
{'1': '\xe5\xa4\xa7'}
Why there is a difference between a
and a['1']
? How to make print a
be {'1': '大'}
?