int:
bool:
类型转换:
str到int有条件,str必须是数字, "123e"是错误的
bool转换为int类型,需要int(x)
结果:
结果:
扫描二维码关注公众号,回复:
6305122 查看本文章
空字符串不要加空格,
ValueError:语法错误
int:
bool:
类型转换:
str到int有条件,str必须是数字, "123e"是错误的
bool转换为int类型,需要int(x)
结果:
结果:
空字符串不要加空格,
ValueError:语法错误