Itertools Python3

Smith smith at smith.com
Tue Aug 30 06:24:50 EDT 2016


Hi,
I can not write to the file.
Can someone help me?
Thanks

from itertools import product
valore = input('Inserisci un valore:  ')
risultato = product(valore, repeat = 3)
with open("file.txt", "w") as result:
         for i in risultato:
                 print (result,"".join(i))



More information about the Python-list mailing list