concept ) function in category python

appears as: ) function
Tiny Python Projects: Learn coding and testing with puzzles and games

This is an excerpt from Manning's book Tiny Python Projects: Learn coding and testing with puzzles and games.

The type() function will tell you what kind of data Python thinks something is:

The map() function is a lazy function, like the range() function we looked at earlier. It won’t create the values until you actually need them, as compared to a list comprehension, which will produce the resulting list immediately. I don’t personally tend to worry about the performance of the code as much as I do the readability. When I write code for myself, I prefer to use map(), but you should write code that makes the most sense for you and your teammates.

Figure 11.7 The map() function will call the verse() function with each element produced by the range() function. It’s functions all the way down.