file I/O and arithmetic calculation

Keira Wilson wilkeira at gmail.com
Wed May 22 12:13:19 EDT 2013


Dear all,

I would appreciate if someone could write a simple python code for the
purpose below:

I have five text files each of 10 columns by 10 rows as follows:

file_one = 'C:/test/1.txt'
file_two = 'C:/test/2.txt' . . .
file_five = 'C:/test/5.txt'

 I want to calculate the mean of first row (10 elements) for each file (5
files), if mean of first column (10 elements) of each file (5 files) is 50.

Thank you in advance.

Keira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130523/9175a89c/attachment.html>


More information about the Python-list mailing list