Discuss / Python / 测试

测试

Topic source

李_超

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

L2 = [x.lower() for x in L1 if isinstance(x, str)]

x.lower是换小写
isinstance内置函数 是否是字符串   不能用x==str


  • 1

Reply