Possible Duplicate:
Iterate an iterator by chunks (of n) in Python?
Say I have a string of 492 characters stored in a single variable. How might I print out the first 50 characters, then go to the next line, then print out the next 50, finally printing a line with 42 characters?
1 Answer