python基础 强转类型

来源:互联网 发布:淘宝助理尺码库怎么用 编辑:程序博客网 时间:2024/05/07 10:07
>>> int('123')123>>> int(12.34)12>>> float('12.34')12.34>>> str(1.23)'1.23'>>> unicode(100)u'100'>>> bool(1)True>>> bool('')False
0 0