Discuss / Python / 交作业

交作业

Topic source

倒吃甘蔗

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

lower() 方法是字符串对象的方法,列表对象没有 lower() 方法。

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

  • 1

Reply