Python3 tuple 函数

Python 3 教程 · 2019-02-05 09:43:14

描述

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

语法

以下是 tuple 的语法:

tuple( seq )

参数

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

返回值

返回元组。

实例

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

实例

>>>list1= ['Google', 'Taobao', 'Codercto', 'Baidu'] >>> tuple1=tuple(list1) >>> tuple1 ('Google', 'Taobao', 'Codercto', 'Baidu')

点击查看所有 Python 3 教程 文章: https://codercto.com/courses/l/10.html

查看所有标签

Software Paradigms

Software Paradigms

Stephen H. Kaisler / Wiley-Interscience / 2005-03-17 / USD 93.95

Software Paradigms provides the first complete compilation of software paradigms commonly used to develop large software applications, with coverage ranging from discrete problems to full-scale applic......一起来看看 《Software Paradigms》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具