I am a newbie with Python and I search how to parse a .txt file. My .txt file is a namelist with computation informations like :
myfile.txt
Dict comprehensions (PEP 274) can be used for a shorter expression (60 characters):
d = {k:float(v) for k, v in (l.split('=') for l in open(f))}
EDIT: shortened from 72 to 60 characters thanks to @jmb suggestion (avoid .readlines()).
.readlines()