On Tue, Aug 30, 2016 at 8:24 PM, Smith <sm...@smith.com> wrote:
> 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))

Do you get an exception, possibly from the product() call? When you
ask for help, copy and paste the entire traceback and error message;
it's extremely useful information.

I'm pretty sure I know what the problem is here, but I want you to
post the traceback, so that you learn how debugging of Python code
works :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to