1.常见python函数
abs()
max()
min()
pow()
round()
fabs()
ceil()
floor()
exp()
2. 字符串和字符
letter='A'
message=" good"
3.编码
1.ASCII码表
2.函数ord()和chr()
>>>ch = 'a'
>>>ord(ch)
97
>>> chr(98)
'b'
>>>ord()
65
>>>
3.转义序列
print(” hello word jack’s “) 错误
print(” hello word \”jack’s\”“) 正确
\b 退格
\t 制表符
\n 换行符
\f 换页符
\r 回车符
\\ 反斜线
\' 单引号
\" 双引号
4.不换行打印
print(item , end = ” anyendingstring”)
5.函数 str
>>> s = str(3.4) # Convert afloat to string
>>> s
'3.4'
6.字符串连接操作
可以用+来对两个数字进行加法,也可以连接两个字符串