text = """This is the first line.
           This is the second line.
           The line below is true.
           The line above is false.
           A short line.
           A very very very very very very very very very long line.
           A self-referential line.
           The last line.
        """
lines = (i.strip() for i in text.splitlines())
for line in lines:
    pass
What's the best way to split a string into fixed length chunks and work with them in Python?