Discuss / Python / 作业 2016.07.03

作业 2016.07.03

Topic source
L1=['Hello','World',18,'Apple',None]
L2=[s.lower() for s in L1 if isinstance(s,str)]
print(L2)

第一遍的时候没有想到‘==True’可以省略。


  • 1

Reply