- 数字列表切换为字符串列表
1.
1 ls = [1,2,3,4,5] 2 3 list1 = [str(x) for x in ls]
2.
1 list2 = list(map(str,ls))
- 字符串列表切换为数字列表
1.
1 list11 = [int(x) for x in list1]
2.
1 list22 = list(map(int,list2))
标签:map,数字,列表,切换,字符串,ls From: https://www.cnblogs.com/geek-arking/p/16708366.html