L1 = ['Hello', 'World', 18, 'Apple', None] L2 = list() for item in L1: if isinstance(item, str) == True: s1 = item.lower() L2.append(s1) else: pass
没有用到列表生成式啊
Sign in to make a reply
Kairos_hh