📜  python 将列表转换为字符串列表 - Python 代码示例

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

代码示例3
# Basic syntax using list comprehension:
lsit_of_strings = [str(i) for i in your_list]

# Example usage:
your_list = ['strings', 'and', 'numbers', 11, 23, 42]
lsit_of_strings = [str(i) for i in your_list]
print(lsit_of_strings)
--> ['strings', 'and', 'numbers', '11', '23', '42'] # List of strings