Discuss / Python / homework~

homework~

Topic source

易苏杭

#1 Created at ... [Delete] [Delete and Lock User]
# -*- coding: utf-8 -*-

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

想忘记哦

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

你不觉得这个==True很多余吗?


  • 1

Reply