[EMAIL PROTECTED] wrote:
> for line in (l.rstrip("\n") for l in file("test.txt", "rU") if l[0] !=
> "\n"):
> k, v = line.split()
> d.setdefault(k, []).append(v)Note that this snippet will produce the same output with or without the rstrip() method call. Peter -- http://mail.python.org/mailman/listinfo/python-list
