On Tue, Apr 18, 2017 at 1:37 AM, MRAB <pyt...@mrabarnett.plus.com> wrote:
> In Python 3 it's:
>
> c = next(itertools.dropwhile(
>      lambda c: c==' ',
>      iter(lambda: sys.stdin.read(1),None)
>      ))

iter's sentinel should be an empty string.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to