Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Python の文字列とリストで構成される辞書があります。
{'stringhere':[a1,a2,a3], 'anotherstringhere':[a2,a4,a5],....}
問題は、一部の文字列が特殊文字として記述されていることです。これは、たとえば'ol\xe9'の代わりに のように強調されるためです。'olé'
'ol\xe9'
'olé'
これらの文字列を順番に変更して、期待される ( 'olé') 結果を達成することは可能ですか? 前もって感謝します。
# -*- coding: utf-8 -*- a = {'olé' : 1} for i in a: print i, a[i] Output: olé 1
では、何が必要ですか、説明してください。