Can Python's map function call object member functions?

后端 未结 5 1781
無奈伤痛
無奈伤痛 2021-02-01 14:31

I need to do something that is functionally equivalent to this:

for foo in foos:
    bar = foo.get_bar()
    # Do something with bar

My first i

5条回答
提交回复
热议问题