How to output "Ketsumaimo" as standard output in Python

print('Ketsumaimo')

Since Python3 supports UTF-8 by default, "Ketsumaimo" is output as it is.

print u'Ketsumaimo'
print 'Ketsumaimo'.encode('utf-8')
# -*- coding: utf-8 -*-
print 'Ketsumaimo'

In Python2 series, there are two types of character strings, byte character strings and Unicode character strings, and ASCII is supported by default, so byte character strings are output. In order to display a multi-byte Unicode string such as "Ketsumaimo", it is necessary to convert the byte string to a Unicode string.

Recommended Posts

How to output "Ketsumaimo" as standard output in Python
[CentOS8] How to output Python standard output to systemd log
How to develop in Python
[Python] How to output the list values in order
[Python] How to do PCA in Python
How to collect images in Python
Make standard output non-blocking in Python
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
How to use PubChem in Python
How to handle Japanese in Python
How to debug the Python standard library in Visual Studio
Change the standard output destination to a file in Python
[Introduction to Python] How to use class in Python?
How to access environment variables in Python
How to dynamically define variables in Python
How to do R chartr () in Python
[Itertools.permutations] How to put permutations in Python
How to get a stacktrace in python
How to display multiplication table in python
How to extract polygon area in Python
How to check opencv version in python
How to switch python versions in cloud9
How to use __slots__ in Python class
How to dynamically zero pad in Python
How to use regular expressions in Python
How to display Hello world in python
How to use is and == in Python
How to write Ruby to_s in Python
How to use the C library in Python
Output formatted output in Python, such as C / C ++ printf.
How to receive command line arguments in Python
3.14 π day, so try to output in Python
[REAPER] How to play with Reascript in Python
How to clear tuples in a list (Python)
How to install Python
How to generate permutations in Python and C ++
How to embed a variable in a python string
How to implement Discord Slash Command in Python
How to use Python Image Library in python3 series
How to create a JSON file in Python
[Python] How to put any number of standard inputs in a list
How to install python
Summary of how to use MNIST in Python
How to install python package in local environment as a general user
How to specify TLS version in python requests
How to erase the characters output by Python
How to get the files in the [Python] folder
How to use tkinter with python in pyenv
Japanese output in Python
[Python] How to draw a histogram in Matplotlib
How to handle datetime type in python sqlite3
How to make Python Interpreter changes in Pycharm
How to plot autocorrelation and partial autocorrelation in python
How to remove duplicate elements in Python3 list
How to input a character string in Python and output it as it is or in the opposite direction.
[Python] How to name table data and output it in csv (to_csv method)
Output timing is incorrect when standard (error) output is converted to a file in Python
How to run GUI programs such as tkinter in Python environment on WSL2
How to retrieve the nth largest value in Python