Is it possible to put an assignment into a context, so that the variable is not available after the block?

后端 未结 0 754
梦谈多话
梦谈多话 2020-12-12 00:02

Consider this:

mydict[\'a\'].f()
mydict[\'a\'].g()

This repeats mydict[\'a\'] undesirably. One option might be:

a         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题