Created
January 27, 2015 02:40
-
-
Save otknoy/d5ac40898c4446fb73de to your computer and use it in GitHub Desktop.
Python で iterator の長さを取得する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print sum(1 for _ in re.finditer(pattern, text)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment