首页 > 代码库 > Python之路-类型转换

Python之路-类型转换

str类型转换成int类型:
n = "1"
m = int(n) #m = 1
int类型转换成str类型:
n = 1
m = str(n)#m = "1"

Python之路-类型转换