This chapter describes the
ord in Python ()The meaning and function of functions, in general,
ord () functionMainly used to return the corresponding characters of the ASCII code, CHR () is mainly used to denote the ASCII code corresponding to the
Examples of the chr unichr ord function in python, unichrord
Examples of the chr unichr ord function in python
The chr () function uses a range (0 to 256 ~ 255) an integer is used as a parameter and a corresponding character is returned. Unichr ()
DescribeThe Ord () function is the Chr () function (for 8-bit ASCII strings) or the UNICHR () function (for Unicode objects), which returns the corresponding ASCII value, or Unicode value, as a parameter with a character (a string of length 1). If
This function converts a string representation of a character to an integer corresponding to a character typeface, and is suitable for UNICODE characters. For example , ord (' a ') returns an integer , andord (' \u2020 ') returns an integer 8224 .
This article mainly shares Python common operation string function and method summary knot, including the string format output and splicing and other basic knowledge, need friends can refer to the next
For example, a string Python, which is just a
What does def init mean in the Python class, what does it do, what is the requirement?
Application :Initializes the value of the instance. These values are typically called by other methodsRequirements :Initialize values only, do
The use of the raw socket these days, with Python to write some demo program, recorded here.
First, let's look at a simple sniffer program:
Copy the Code code as follows:
# code for Linux
#s = Socket.socket
Python BASICS (10)-numbers, python basics-Numbers
The topic of this article is numbers in Python. Describes each numeric type in detail, the various operators they apply, and the built-in functions used to process numbers. At the end of the article,
Python BASICS (2) --- data type, python Data Type
1. Differences between python versions:
Comparison between 2.x and 3.x
Print "" or print () can be printed normally
Only print ().
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.