我是爱哭鬼  

2017年2月7日

摘要: 1、查找电话号码 #! coding=utf-8import re"""查找字符串中的文本"""txt="your number is 415-555-4242,your name is yy,her number is 131-129-9909"phoneNumRex=re.compile(r'\ 阅读全文
posted @ 2017-02-07 17:53 我是爱哭鬼 阅读(2797) 评论(0) 推荐(0) 编辑
 
摘要: 1、将一串字符串反向输出,如将"abcd"变成“dcba” 2、判断是否为回文——判断用户输入的字符串是否为回文。回文是指正反拼写形式都是一样的词,譬如“racecar”。 3、统计一段英文语句的字母个数: 4、统计一段英文语句中单词的个数: 阅读全文
posted @ 2017-02-07 15:35 我是爱哭鬼 阅读(396) 评论(0) 推荐(0) 编辑