긴 대시 (–
)를 짧은 대시 (-
)로 바꾸고 싶습니다. 내 코드 : 다음과 같은 오류에파이썬, 긴 대시를 짧은 대쉬로 바꿉니 까?
if " – " in string:
string = string.replace(" – ", " - ")
결과 :
SyntaxError: Non-ASCII character '\xe2' in file ./script.py on line 76, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
어떻게이 문제를 해결할 수 있습니까?
PEP 263을 읽습니까? – geoffspear