讓我們比較一下:for path in filePaths : if(self.module!=organizer and self.module!=decoder): # some code with loops elif(self.module==decoder): # some code with loops和這個(gè):if(self.module!=organizer and self.module!=decoder): for path in filePaths : # some code with loopselif(self.module==decoder): for path in filePaths : # some code with loops哪一個(gè)是最有效的,為什么?
if 語句在 for 循環(huán)內(nèi)部或外部的復(fù)雜性
繁星點(diǎn)點(diǎn)滴滴
2022-07-05 17:40:32