Can you please explain this behaviour ? I am trying to understand the map and lambda function with a simple example
list_ = [1,2,3,4]
list_= map(lambda x: x,list_)
Output is as follows
[1, 2, 3, 4] (This is the output of 1st print statement)
<map object at 0x7f6a16216550> (This is the output of the 2nd print statement)
If I do print(list(list_)) for the second print statement, then I get the required output which prints the list
Why do I require the extra “list” syntax in the print statement ?