Home>Article>Backend Development> How to input Chinese in python

How to input Chinese in python

藏色散人
藏色散人 Original
2019-10-17 11:05:26 9342browse

How to input Chinese in python

How to input Chinese in python?

1. Create a new file test.py in the folder.

How to input Chinese in python

Recommendation: "Python Tutorial"

2, click to open the file and enter the following code:

#!/usr/bin/env python # -*- coding: utf-8 -*- print u'中文测试正常'。

How to input Chinese in python

3. Run the DOS interface in the folder.

How to input Chinese in python

#4, enter test.py and run, you can successfully enter the Chinese characters of "Chinese test is normal".

How to input Chinese in python

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn