import os

lst = []
for x in xrange(1, 5001):
    lst.append(r"Data\ma{0}.wav Data\ma{0}.mfc".format(x))
    lst.insert(x-1, r"Data\ja{0}.wav Data\ja{0}.mfc".format(x))

with open("filename.txt", "w") as fd:
    sep = os.linesep
    fd.write(sep.join(lst))


On Thu, Jun 30, 2011 at 5:19 PM, Siboniso Shangase
<sms.shang...@gmail.com>wrote:

> Hi
> i m very new to python and i need hepl plz!!
>
> i want to type this data in a text file it the same the diffrence is
> the number that only increase and i canot write this up myself since
> it up to 5000 samples
>
> Data\ja1.wav Data\ja1.mfc
> Data\ja2.wav Data\ja2.mfc
> Data\ja3.wav Data\ja3.mfc
> Data\ja4.wav Data\ja4.mfc
> .
> .
> .
> .
> Data\ja(n).wav Data\ja(n).mfc
>
> Data\ma1.wav Data\ma1.mfc
> Data\ma2.wav Data\ma2.mfc
> Data\ma3.wav Data\ma3.mfc
> Data\ma4.wav Data\ma4.mfc
> .
> .
> .
> Data\ma(n).wav Data\ma(n).mfc
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to