[Tutor] how to separate the digital and the alphabeta
lina
lina.lastname at gmail.com
Thu Nov 3 17:37:18 CET 2011
<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,
More information about the Tutor
mailing list