-
Return the string representing a character whose Unicode code point is the integer i. For example,
chr(97)
returns the string'a'
. This is the inverse oford()
. The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in base 16).ValueError
will be raised if i is outside that range.根据ascii码返回某个字符,注意函数参数需要写为 0x XX
chr
(i)
-
Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. For example,
ord('a')
returns the integer97
andord('\u2020')
returns8224
. This is the inverse ofchr()
.
ord
(c)
str.
capitalize
()
str.
isupper
()
Return true if all cased characters [4] in the string are uppercase and there is at least one cased character, false otherwise.
str.
lower
()
Return a copy of the string with all the cased characters [4] converted to lowercase.
str.
join
(iterable)
TypeError
will be raised if there are any non-string values in iterable, including bytes
objects. The separator between elements is the string providing this method.
str.
lower
()
Return a copy of the string with all the cased characters [4] converted to lowercase.
string.
lower
(s)