On Thu, Nov 11, 2010 at 6:10 PM, Peter Otten <__pete...@web.de> wrote:
> (line for line in sys.stdin)
>
> and sys.stdin are equivalent as are
>
> [v for v in items]
>
> and list(items)
>
> So
>
> print list(islice(sys.stdin, 5))

I was being a little verbose ... But I like your simplification :)

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to