Going for a wholefor loop round vs getting the list sliced : Which solution is more efficient?

前端 未结 0 1441
清酒与你
清酒与你 2020-12-02 08:34

So here\'s two simple snippets of code :

myList = [17, 3, 11, 5, 1, 9, 7, 15, 13]
largest = myList[0]
for i in myList:
    if i > largest:
        largest          


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