愤怒中的小草

博客园 首页 新随笔 联系 订阅 管理

2019年1月25日 #

摘要: #字符串到数字 可以进行各种进制转换#print(int('11111',8))#需求 对字符串中的单词翻转 保留空格#第一种方法 最笨clstr='I love you!'bam=clstr.split(' ')rebam=bam[2]+' '+bam[1]+' '+bam[0]#print(rebam)#第二种方法def reverse_word(s): s1=s.split(' ')... 阅读全文
posted @ 2019-01-25 20:29 愤怒中的小草 阅读(291) 评论(0) 推荐(0) 编辑