from itertools import repeat, takewhile print(tuple(takewhile(bool, map(lambda _: input(), repeat(None)))))
foo bar baz for ^ this empty line
('foo', 'bar', 'baz')
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!