I've got trouble with using generator on map object. This is the simpliest example:
a = ['1','2','3']
a = map(int, a)
for x in a:
print(x, end = ' ') #output 1 2 3
b = [x for x in a]
print(b) #output []
Python 3.5
P.S. Of course I know about list(map) but I want to know why this doesn't work.