小白教程
所有教程
关于
Search
172.70.130.248
172.70.130.248
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Python3 func tuple”的源代码
本页内容
上一节:
Python_func_print
下一节:
Python_func_callable
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:tuple()}}[[Category:python3 built in functions|39]] = Python3 tuple 函数 = [[python3 built in functions|Python3 内置函数]] == 描述 == tuple 函数将可迭代系列(如列表)转换为元组。 === 语法 === 以下是 tuple 的语法: <sample title="" desc="" lang="python" hererun="1"> tuple( iterable ) </sample> === 参数 === * iterable -- 要转换为元组的可迭代序列。 === 返回值 === 返回元组。 以下展示了使用 tuple 的实例: <sample title="" desc="" lang="python" hererun="1"> >>>list1= ['Google', 'Taobao', 'xiaoBai', 'Baidu'] >>> tuple1=tuple(list1) >>> tuple1 ('Google', 'Taobao', 'xiaoBai', 'Baidu') </sample> [[python3 built in functions|Python3 内置函数]]
返回至“
Python3 func tuple
”。
上一节:
Python_func_print
下一节:
Python_func_callable