On Tue, Apr 18, 2017 at 1:37 AM, MRAB <python at 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.