首页
科技
登录
6mi
u
盘
搜
搜 索
科技
7.16python日学变量类型及字符串操作
7.16python日学变量类型及字符串操作
it
2022-05-05
127
7.16
数字类型 数字,字符串,列表混合数字类型自动升级 例如print(True+10)强制转换 int(),float(),bool()变量
a = 15
print(type(a))
5 .共享引用
a = 10
b = a
a = 5
print(b)
6.字符串的拼接,重复
a = ‘3’
b=‘4’
print(a+b)
a=‘bc’
print(a*3)
7.chr()与ord()
a = input(‘enter A-Z:’)
ch = ord(a)
print(ch-64)
转载请注明原文地址: https://win8.8miu.com/read-21172.html
专利
最新回复
(
0
)