VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > 编程开发 > python3 >
  • python3教程之Python3 tuple 函数

本站最新发布   Python从入门到精通|Python基础教程
试听地址  
https://www.xin3721.com/eschool/pythonxin3721/


Python3 tuple 函数

Python3 内置函数 Python3 内置函数

描述

Python3 tuple 函数将列表转换为元组。。

语法

以下是 tuple 的语法:

tuple( seq )

参数

  • seq -- 要转换为元组的序列。

返回值

返回元组。

实例

以下展示了使用 tuple 的实例:

>>>list1= ['Google', 'Taobao', 'W3Cschool', 'Baidu']
>>> tuple1=tuple(list1)
>>> tuple1
('Google', 'Taobao', 'W3Cschool', 'Baidu')
相关教程