
Untitled
By: a guest on
May 12th, 2012 | syntax:
None | size: 0.61 KB | hits: 12 | expires: Never
How to save output of a generated text
for i in xrange(300):
sys.stdout.write(alphabet[bisect.bisect(f_list, random.random())
for i in xrange(300):
text1=sys.stdout.write(alphabet[bisect.bisect(f_list, random.random())
for word in text1:
fd.inc(word)
text1 = [alphabet[bisect.bisect(f_list, random.random())] for i in xrange(300)]
text1=sys.stdout.write(alphabet[bisect.bisect(f_list, random.random())])
texts = []
for i in xrange(300):
texts.append(alphabet[bisect.bisect(f_list, random.random())])
# Do something with each element of the list
for word in texts:
fd.inc(word)