📜  python 将函数应用到列表中 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:12.352000             🧑  作者: Mango

代码示例1
>>> mylis = ['this is test', 'another test']
>>> [item.upper() for item in mylis]
['THIS IS TEST', 'ANOTHER TEST']