[Tutor] list problem
W.W.vandenBroek
W.W.vandenBroek
Sun, 31 Dec 2000 15:06:02 +0100
Hi all,
Trying to make a little "program" for myself, i am working my way through:
"Teach yourself python..". Found out that mathematical subject are the topics
to begin with in simple programming. I am a psychiatrist so i am used to
associative thinking and pattern recognition instead of logical thinking so
bare with me please. As a psychiatrist i am doing some research. I wanted to
program some simple statistics, like finding the median of a list or a mean,
range and quartiles.
Lists are probably useful in this, so started making a list in a file:
list.txt: l= [n, n1, n2,.....]
Next tried to make a program with a sorted list as output
#!/usr/local/bin/python
x = open("list.txt", "rb")
x.read ()
x.sort ()
print x
Tried different options cannot figure out the problem.
Can somebody please enlighten me or point me in a direction,
thanks walter
W.W. van den Broek e-mail: vandenbroek@psyd.azr.nl
AZR-Dijkzigt fax: 010-4633217
afdeling psychiatrie tel: 010-4639222
Postbus 2040 e-mail vdbroekw@wxs.nl (thuis)
3000 CA Rotterdam homepage: http://home.planet.nl/~vdbroekw