L2 = [s.lower() for s in L1 if isinstance(s,str)]
请问为什么可以直接在遍历L1后面直接加判断,这是什么语法?
咱俩是一样的
Sign in to make a reply
吃西瓜不吐香蕉瓤
L2 = [s.lower() for s in L1 if isinstance(s,str)]