Home > Article > Backend Development > How to input Chinese in python
How to input Chinese in python?
1. Create a new file test.py in the folder.
Recommendation: "Python Tutorial"
2, click to open the file and enter the following code:
#!/usr/bin/env python # -*- coding: utf-8 -*- print u'中文测试正常'。
3. Run the DOS interface in the folder.
#4, enter test.py and run, you can successfully enter the Chinese characters of "Chinese test is normal".
The above is the detailed content of How to input Chinese in python. For more information, please follow other related articles on the PHP Chinese website!