Jul-28-2017, 01:32 PM
Hello everybody ,
My code is
k= 1 l= 4
k= 1 l= 5
k= 1 l= 6
k= 2 l= 4
k= 2 l= 5
k= 2 l= 6
k= 3 l= 4
k= 3 l= 5
k= 3 l= 6
How can I write each of these combinations on a different file? So I need to have 9 files which contains one of these combinations ? Thank you so much ın advance
Regards
My code is
for k in [1,2,3]: for l in [4,5,6]: print("k=" ,k, "l=",l)As a result of this small code I get :
k= 1 l= 4
k= 1 l= 5
k= 1 l= 6
k= 2 l= 4
k= 2 l= 5
k= 2 l= 6
k= 3 l= 4
k= 3 l= 5
k= 3 l= 6
How can I write each of these combinations on a different file? So I need to have 9 files which contains one of these combinations ? Thank you so much ın advance
Regards