Python列表list转字符串报错:expected str instance, int found
代码中定义了一个字符串:
alist=[1,2,3,4,5]
结果''.join(alist)报错(因为列表中数据为整型),
expected str instance, int found
解决方法:
''.join(str(alist))
2023-04-13 09:35:17 阅读次数:412
Python列表list转字符串报错:expected str instance, int found
代码中定义了一个字符串:
alist=[1,2,3,4,5]
结果''.join(alist)报错(因为列表中数据为整型),
expected str instance, int found
解决方法:
''.join(str(alist))
linux服务器安装pip命令
【python基础】学习路线
【后端】【语言】【python】python常见操作
【python】python 打印时间 python打印程序运行时间
【python C结构体】Python Ctypes结构体指针处理(函数参数,函数返回)
Python 进阶 - 日常工作中使用过的简单Trick
Blender下使用python设置骨骼旋转
LeetCode专题-Python实现之第21题:Merge Two Sorted Lists
Python 打包——过去、现在与未来
Python 中 -m 的典型用法、原理解析与发展演变
文章
31240
阅读量
4455657
2025-03-11 09:34:07
2025-03-05 09:24:43
2025-03-05 09:23:32
2025-03-05 09:22:45
2025-03-04 09:05:20
2025-02-26 07:20:57
2023-03-16 07:49:58
2024-09-24 06:30:08
2023-04-25 10:20:57
2023-04-13 09:31:09
2023-06-07 07:31:52
2023-02-21 03:02:11