Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 12th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to save output of a generated text
  2. for i in xrange(300):
  3.     sys.stdout.write(alphabet[bisect.bisect(f_list, random.random())
  4.        
  5. for i in xrange(300):
  6.     text1=sys.stdout.write(alphabet[bisect.bisect(f_list, random.random())
  7.  
  8. for word in text1:
  9.     fd.inc(word)
  10.        
  11. text1 = [alphabet[bisect.bisect(f_list, random.random())] for i in xrange(300)]
  12.        
  13. text1=sys.stdout.write(alphabet[bisect.bisect(f_list, random.random())])
  14.        
  15. texts = []
  16. for i in xrange(300):
  17.     texts.append(alphabet[bisect.bisect(f_list, random.random())])
  18.  
  19. # Do something with each element of the list
  20. for word in texts:
  21.     fd.inc(word)