为什么我在vscode里面输入元组报错string indices must be integers, not tuple

来源:3-13 字符串运算 二

Sneakersinkill

2018-10-21

print (“hello world”[0,2])
就报错了

发生异常: exceptions.TypeError
string indices must be integers, not tuple

写回答

1回答

Sneakersinkill

提问者

2018-10-21

不好意思,是:号  不是,号  已经解决了  哈哈哈

0
0

Python3.8系统入门+进阶 (程序员必备第二语言)

语法精讲/配套练习+思考题/原生爬虫实战

14598 学习 · 4470 问题

查看课程