Hello there i have the following code:
path = some destination on your harddrive
def K(path):
try:
getfile = open(path + '/test.txt')
line = getfile.readlines()
print line
getfile.close()
except:
line = getfile.readlines()
eval(line)
d = dict()
val= d[k]
to import a textfile, now my problem is to avoid the \n, which i assume can be done using the eval() function. I want to convert the string i get as input, to floats i can work with..
Thanx for any tips in advance
evalto avoid\nis something indescribable.intobjects?