In an effort to learn how to work with information in files, I am writing a program that opens an already existing file containing decimal numbers. It then takes the decimals, sorts them, and returns median and mean.

Here's what I have so far:

Code:
#opening file as a read only file
f = open('testfile', 'r') 

#assigns variable to string
numbers = f.read(testfile) 

#Make a list
...