Bruno Desthuilliers a écrit : (snip) > # Notice that here, b is a string, not a number... > try: > b = int(tmp[1])
oops, I meant: b = float(tmp[1]) Idem here: > def extract_number(iterable): > for linenum, line in enumerate(iterable): > try: > yield int(line.strip().split()[1]) yield float(line.strip().split()[1]) -- http://mail.python.org/mailman/listinfo/python-list