Discuss / Python / 交作业

交作业

Topic source

L = ['Hello', 'World',18, 'IBM', 'Apple',None] L1 = [x.upper() for x in L if isinstance(x,str)] L2 = [y.lower() for y in L if isinstance(y,str)] print(L1) print(L2)


  • 1

Reply