사전 항목을 목록으로 변환하려고하지만 사전 항목에 'u'가 포함되어 있습니다. 예 : 사전 = {u'test1 'u'test1value', u'test2 'u'test2value'} 은 내가사전 항목에서 'u'(유니 코드)를 제거하는 방법
f = dictionary
output_list = f.items()
return output_list
을 사용하고 output_list이 (u'test1를 포함 ', u'test1value'), (u'test2 ', u'test2value')
->하지만 나는 ('test1', 'test1value'), ('test2', 'test2value)로 out_list를 기대하고 있습니다. 다른 항목과 값. 이 문제에 대한 도움을주십시오.
가능한 복제본 [왜 파이썬에서 유니 코드 문자열 목록을 인쇄 할 때 u "xyz"형식을 사용합니까?] (http://stackoverflow.com/questions/2180929/why-do-i-get- -yxyz-format-when-i-print-of-unicode-strings-in-python) – geoffspear