I started python.
I'm using pyChram on my Mac. The story of environment construction is separate.
This time, when I used Japanese in the code, I immediately got a Syntax Error.
''SyntaxError: Non-ASCII character '\xa3' in file''
When dealing with Japanese
test.py
# -*- coding: utf-8 -*-
__author__ = 'ashibuya'
queries=['Mozart', 'Beethoven','Haydn']
for q in queries:
print q
queries=[u'Mozart', u'Beethoven',u'Haydn']
for q in queries:
print q
Reference site
http://stackoverflow.com/questions/10589620/syntaxerror-non-ascii-character-xa3-in-file-when-function-returns
Recommended Posts