L = ['Hello', 'World', 18, 'Apple', None] lp = [w.lower() for w in L if isinstance(w,str)] print(lp)
Sign in to make a reply
L的日记37130020
L = ['Hello', 'World', 18, 'Apple', None] lp = [w.lower() for w in L if isinstance(w,str)] print(lp)