Lỗi SyntaxError: Non-ASCII character ‘\xe1’ in file

SyntaxError: Non-ASCII character ‘\xe1’ in file .\ex2.py on line 1, but no encoding declared; see http://python.org/dev/
peps/pep-0263/ for details

Khai báo ở đầu tập tin:

 # -*- coding: utf-8 -*-
2 Likes
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?