<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yuheiomori0718</author_name>
  <author_url>https://blog.hatena.ne.jp/yuheiomori0718/</author_url>
  <blog_title>メモ置き場</blog_title>
  <blog_url>https://y0m0r.hateblo.jp/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>先日、Pythonで文字列からN文字ずつ取り出すジェネレータを考えてみました。 で、コメントいただいたりして、いくつかやり方がでてきたので、せっかくなのでベンチマークをとってみました。 # coding=utf-8 import StringIO from benchmarker import Benchmarker import itertools text = &quot;a&quot; * 10000 # StringIOのreadを使う def split_text(text, n): if not isinstance(text, unicode): text = text.decode('utf-8'…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20120828%2F1346128803&quot; title=&quot;Pythonで文字列からN文字ずつ取り出すジェネレータのベンチマーク - メモ置き場&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/y/yuheiomori0718/20120828/20120828091023.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-08-28 13:40:03</published>
  <title>Pythonで文字列からN文字ずつ取り出すジェネレータのベンチマーク</title>
  <type>rich</type>
  <url>https://y0m0r.hateblo.jp/entry/20120828/1346128803</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
