What is the purpose of two cases in using “sorted” in the following python code?

后端 未结 0 607
长发绾君心
长发绾君心 2021-01-21 08:11

I just came across a piece of code in a function as follows:

 if all(is_integer(x) for x in classes):
        classes = sorted(classes, key=lambda x: int(x))
 els         


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