L2 = ['Hello', 'World', 18, 'Apple', None] L3 = [s.lower() for s in L2 if isinstance(s,str)] print(L3)
Sign in to make a reply
BillCode
练习
L2 = ['Hello', 'World', 18, 'Apple', None] L3 = [s.lower() for s in L2 if isinstance(s,str)] print(L3)