<snip>

I have another question, regarding the generator,

def translate_process(dictionary,tobetranslatedfile):
    results=[]
    with open(tobetranslatedfile,"r") as f:
        results=(dictionary[line.split()[2]] for line in f)
        print(list(results))
        print(len(list(results)))


Here the print(list(results))
did print a long list out,
but why later print(len(list(results)))
print 0 out?

sorry, seems that way is very trivial.

Best regards,
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to