摘要: 正则 re.findall 的简单用法(返回string中所有与pattern相匹配的全部字串,返回形式为数组) 1 findall(pattern, string, flags=0) import rePython 正则表达式 re findall 方法能够以列表的形式返回能匹配的子串# prin 阅读全文
posted @ 2020-04-03 17:51 LuckyKun的羊肉 阅读(1803) 评论(0) 推荐(0) 编辑
摘要: 1 public class Test { 2 public static void main(String args[]) { 4 String Str = new String("www.runoob.com"); 6 System.out.print("返回值 :" ); 8 System.o 阅读全文
posted @ 2020-04-03 17:27 LuckyKun的羊肉 阅读(565) 评论(0) 推荐(0) 编辑
摘要: heapq.nlargest(n, iterable[, key]) 从迭代器对象iterable中返回前n个最大的元素列表,其中关键字参数key用于匹配是字典对象的iterable,用于更复杂的数据结构中。 heapq.nsmallest(n, iterable[, key]) 从迭代器对象ite 阅读全文
posted @ 2020-04-03 16:56 LuckyKun的羊肉 阅读(2242) 评论(0) 推荐(0) 编辑