Discuss / Python / 原始答案

原始答案

Topic source

休耕

#1 Created at ... [Delete] [Delete and Lock User]

L1 = ['Hello', 'World', 18, 'Apple', None] L2 = [] for x in L1: if isinstance(x,str): L2.append(x.lower()) print (L2)


  • 1

Reply