1
a_list.extend(['four','Ω'])
a_list

['a', 2.0, 3, True, 'four', '\xce\xa9']

why does it shows me xce\xa9? and not the sign omega?

Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
hetansh
  • 11
  • 1
  • 1
    Possible duplicate of [Convert a Unicode string to a string in Python (containing extra symbols)](https://stackoverflow.com/questions/1207457/convert-a-unicode-string-to-a-string-in-python-containing-extra-symbols) – tanaydin Sep 01 '17 at 18:12
  • The OMEGA Symbol is a Unicode Character. It is represented as two Bytes in an ASCII STRING. For UTF-8 encoding those bytes are 0xCE & 0xA9. Perhaps you want to display the correct character https://stackoverflow.com/questions/10569438/how-to-print-unicode-character-in-python – WombatPM Sep 01 '17 at 18:23

0 Answers0