Answer the question
In order to leave comments, you need to log in
Does Python need to indicate encoding at the beginning of a file?
Please tell me how to format the file.
Some sources indicate that you need to write at the beginning:
# coding : utf-8
# PEP-8
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Answer the question
In order to leave comments, you need to log in
https://www.python.org/dev/peps/pep-0263/#examples
Worth mentioning if using weird IDEs/editors or python2 that can mess with utf-8
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question