#数字比作猎人num = 123v = num.bit_length()print(v)#字符串:女巫name1 = ‘shizhengwen‘v1 = name1.upper()print(v1) name2 = ‘laiying‘v2 = name2.upper()print(v2) #整形,int#python3里,122333344,不管数字有多大,都是int类型#python2里,123344#长整形,long#python2里,12233444 long#========python3 =========#数字 int,所有的工功能,都放在int 里#在python3里,1222222222223333333#字符串 str#列表 list#元祖 tuple#字典 dict #布尔值 bool
- int 将字符串转换为数字 a = ‘123‘ b = int(a) b = b + 1000
原文地址:https://www.cnblogs.com/jiangdali/p/9114668.html
时间: 2025-01-04 15:17:32