L1=['Hello','World',18,'Apple',None] L2=[s.lower() for s in L1 if isinstance(s,str)] print(L2)
第一遍的时候没有想到‘==True’可以省略。
Sign in to make a reply
宋明明耀耀耀
第一遍的时候没有想到‘==True’可以省略。