Ned Deily added the comment:
This is behaving as expected. In Python 3, map() returns an iterator, so the
first list(x) exhausts that iterator so that the second list(x) returns an
empty list. This is a difference from Python 2 where map() returns a list.
See:
https://docs.python.org/3.5/w
New submission from Steven Reed:
Example repro:
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> x=map(bool,[1,0,0,1,1,0])
>>> x
>>> list(x)
[True, False, False, True, True,