记录一个现象:
今天在写程序的时候,发现finditer和findall返回的结果不同。一个为list,一个为iterator。
红色箭头的地方,用finditer写的时候,print(item.group())时,返回这样的结果。
而用findall写的时候,结果是这样子。
查了资料才明白,参考:http://blog.csdn.net/wali_wang/article/details/50623991
原文地址:https://www.cnblogs.com/littlepear/p/8456897.html
时间: 2025-01-12 15:51:54