Home > Backend Development > Python Tutorial > How to input Chinese in python

How to input Chinese in python

藏色散人
Release: 2019-10-17 11:05:26
Original
9474 people have browsed it

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'中文测试正常'。
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template