Discuss / Python / 作业

作业

Topic source

立冬前后

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

L = ['Hello', 'World', 'IBM', 18, 'TOYOU']

l = [i.lower() if isinstance(i,str) else i for i in L]

print(L)

print(l)


  • 1

Reply