2021-03-30
阅读量:
649
python报错:TypeError: an integer is required (got type str)
问:
python报错:TypeError: an integer is required (got type str)
答:
根据报错提示可知报错原因是缺少必要的参数,通过查看splitlines函数说明文档,splitlines函数用法如下:
此处出现报错是因为参数输入错误,有上述说明可知道keepends为False或者 True,默认为 False,不包含换行符,如果为 True,则保留换行符。






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论