On Thu, 10 Aug 2006 17:28:59 -0700
Simon Forman <[EMAIL PROTECTED]> wrote:
#> There is a better way to check for exhausted StringIO (Note that
#> "input" is a python built-in and should not be used for a variable
#> name):
Right, thanks for pointing it out.
#> import StringIO
#> s = '1234567890a
Slawomir Nowaczyk wrote:
> On Thu, 10 Aug 2006 11:39:41 -0700
> f pemberton <[EMAIL PROTECTED]> wrote:
>
> #> I have kind of an interesting string, it looks like a couple hundred
> #> letters bunched together with no spaces. Anyway, i'm trying to put a
> #> "?" and a (\n) newline after every 100t
On Thu, 10 Aug 2006 11:39:41 -0700
f pemberton <[EMAIL PROTECTED]> wrote:
#> I have kind of an interesting string, it looks like a couple hundred
#> letters bunched together with no spaces. Anyway, i'm trying to put a
#> "?" and a (\n) newline after every 100th character of the string and
#> the
here's a simple way
numChar = 10
testText="akfldjliugflkjlsuagjlfnflgj"
for c in xrange(0,len(testText),numChar):
print testText[c,c+numChar]
for slightly better performance you should probably do
numChar = 10
testText="akfldjliugflkjlsuagjlfnflgj"
lenText = len(testText)
for c in xrange(0,le
> I have kind of an interesting string, it looks like a couple hundred
> letters bunched together with no spaces. Anyway, i'm trying to put a
> "?" and a (\n) newline after every 100th character of the string and
> then write that string to a file. How would I go about doing that? Any
> help woul
I have kind of an interesting string, it looks like a couple hundred
letters bunched together with no spaces. Anyway, i'm trying to put a
"?" and a (\n) newline after every 100th character of the string and
then write that string to a file. How would I go about doing that? Any
help would be much