Ejemplo n.º 1
0
    print ""
    print word, wocab[word], word1, wocab[word1], word2, wocab[word2]
  
  return None
  
def print_pairs(d):
  for x in d:
    if len(d[x])>0:
      print x, d[x]

letter_a = ord("a")
letter_z = ord("z")
letter_number = letter_z - letter_a + 1
  
zz = pm.pm()
l = mystr.file_to_list_classic("113809of.fic")
d = file_to_dict("c06d.txt")
#d = list_to_dic(l)
print zz

cnt = 0
db = {}
for x in l:
  check_word(d,x)
  cnt += 1
  if cnt % 1000 == 0:
    print ".",

print ""

Ejemplo n.º 2
0
import pm
import mystr

def file_to_list_dump():
  t = []
  fin = open("113809of.fic")
  for line in fin:
    word = line.strip()
    t = t + [word]

  fin.close()
  return t


p = pm.pm()
mystr.file_to_list_simple()
print p

p.start()
mystr.file_to_list_classic()
print p

p.start()
file_to_list_dump()
print p