python 中 将列表中的数值转换为字符串

 

001、

>>> list1 = [111, 222, 333]
>>> list1
[111, 222, 333]
>>> list1 = [str(i) for i in list1]      ## 将列表中数值转换为字符串
>>> list1
['111', '222', '333']

 

posted @ 2023-06-08 20:35  小鲨鱼2018  阅读(36)  评论(0编辑  收藏  举报