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)==1: L2.append(x) print(L2)


  • 1

Reply