Answer the question
In order to leave comments, you need to log in
How does the 'map' function work?
Good afternoon. There is a code: map(abs, (-1, 2))
After running in interactive mode, displays a link to the object in the console: map object at 0x03349130
Based on M. Lutz's reference book and A. Vasiliev's book, the function should return a list of values. What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
> Could you briefly explain how to use the generator?
The generator can be used in the same way as the sheet. That is, write
or if you need the entire list at once, then the
difference between a generator and a list is that the generator does not store all the values in memory, but returns the next one as it is called.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question