摘要: int:bit_lenth() captlze 首字母大写 upper() 全大写 lower() 全小写 find 通过元素找索引,找不到-1 index() 通过元素找索引,找不到 报错 swpcase 大小写翻转 repalce(old,new,count) 替换字符串 isdigit() 返 阅读全文
posted @ 2021-05-14 10:28 索命菩萨 阅读(54) 评论(0) 推荐(0)
摘要: https://edu.51cto.com/course/9043.html 葫芦老师讲的,先存起来 阅读全文
posted @ 2021-05-09 23:26 索命菩萨 阅读(36) 评论(0) 推荐(0)
摘要: https://www.jb51.net/article/196391.htm 注册码: 7PNLXJPODN-eyJsaWNlbnNlSWQiOiI3UE5MWEpQT0ROIiwibGljZW5zZWVOYW1lIjoi6aOe6LGhIOeggeWGnCIsImFzc2lnbmVlTmFtZS 阅读全文
posted @ 2021-05-09 00:28 索命菩萨 阅读(118) 评论(0) 推荐(0)
摘要: #1-2+3-4+5.....+99=? count = 1 sum = 0 while count < 100: if count % 2 == 1: sum = sum + count else: sum = sum - count count += 1 print(sum) View Code 阅读全文
posted @ 2021-05-08 18:05 索命菩萨 阅读(30) 评论(0) 推荐(0)
摘要: 数字:int 12,3,45 + - * / ** % 取余数 ps:type() 字符串转化成数字:int(str) 条件:str必须是数字组成的。 数字转化成字符串:str(int)字符串:str,python当中凡是用引号引起来的都是字符串。 可相加:字符串的拼接。 可相乘:str * int 阅读全文
posted @ 2021-05-08 17:42 索命菩萨 阅读(44) 评论(0) 推荐(0)