Peter Otten wrote:
> [EMAIL PROTECTED] wrote:
>
> > for line in (l.rstrip("\n") for l in file("test.txt", "rU") if l[0] !=
> > "\n"):
> > \001\001\001k,\001v\001=\001line.split()
> > \001\001\001d.setdefault(k,\001[]).append(v)
>
> Note that this snippet will produce the same output with or without the
> rstrip() method call.Wow. That's not at all what I expected. I would've thought I'd see: >>> " 1".split() ['', '1'] -- http://mail.python.org/mailman/listinfo/python-list
