我正在学习python,在这里我看到了下面的场景
在python内部到底发生了什么?
我的代码:
a=10, print(a)
输出形式为:
(10,)
发布于 2021-05-30 07:03:09
a=10,是tuple
a=10,
tuple
您可以使用a函数轻松地确定type的类型,如下所示:
a
type
type(a)
使用a[0]访问值10
a[0]
10
a=10, print(a[0])
https://stackoverflow.com/questions/67758585
相似问题