file processing question
selahattin ay
selahattin_ay at msn.com
Wed Oct 12 07:15:26 EDT 2011
hi all, I wrote these codes but the program must write the prints to a text file...
code = [100, 200, 300, 400, 500]
list= []
a = 0
while a < 9:
a+=1
list.append(a)
last_list = [[int(str(i) + str(k)) for i in code] for k in list]
list2= []
b = 0
while b < 9:
b+=1
list2.append(b)
the thing that I want to do is, I want to create text files from 1 to 9 as in list2
1.txt, 2.txt ....9.txt like thatsample of a text file is :
X:CA
VERSION:2.5
P:(here will be the first value of list2 );;;;
L;C: (here will be the first value of last_list )
the first sample
X:CA
VERSION:2.5
P: 1 ;;;;
L;C: 1001
the first sample
X:CA
VERSION:2.5
P: 8 ;;;;
L;C: 1008
can you help me about this thx for all..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111012/6575f743/attachment.html>
More information about the Python-list
mailing list