Python3 tuple 函数

 Python3 内置函数


描述

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

语法

以下是 tuple 的语法:

tuple( seq )

参数

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

返回值

返回元组。


实例

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

实例

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

Python3 tuple 函数的更多相关文章

  1. Python3 reversed 函数

    Python3 reversed 函数  Python3 内置函数 描述 reversed 函数返回一个反转的迭代器. 语法 以下是 reversed 的语法: reversed(seq) 参数 se ...

  2. 关于Python3中函数:

    # 关于Python3中函数: - 定义 定义函数使用关键字def,后接函数名和放在圆括号()中的可选参数列表,函数内容以冒号起始并且缩进.一般格式如下:``` def 函数名(参数列表): &quo ...

  3. Python3 isinstance() 函数

    Python3 isinstance() 函数 描述 isinstance() 函数来判断一个对象是否是一个已知的类型,类似 type(). isinstance() 与 type() 区别: typ ...

  4. Python3 join函数和os.path.join用法

    Python3  join函数和os.path.join用法 os.path.join()连接两个文件名地址的时候,就比os.path.join("D:\","test. ...

  5. Python3 round() 函数

    Python3 round() 函数  Python3 数字 描述 round() 方法返回浮点数x的四舍五入值. 语法 以下是 round() 方法的语法: round( x [, n] ) 参数 ...

  6. Python3 range() 函数用法

    Python3 range() 函数用法  Python3 内置函数 Python3 range() 函数返回的是一个可迭代对象(类型是对象),而不是列表类型, 所以打印的时候不会打印列表. Pyth ...

  7. Python3 chr() 函数

    Python3 chr() 函数 Python3 内置函数 描述 chr() 用一个整数作参数,返回一个对应的字符. 语法 以下是 chr() 方法的语法: chr(i) 参数 i -- 可以是 10 ...

  8. Python3 bytes 函数

    Python3 bytes 函数  Python3 内置函数 描述 bytes 函数返回一个新的 bytes 对象,该对象是一个 0 <= x < 256 区间内的整数不可变序列.它是 b ...

  9. Python3 pow() 函数

    Python3 pow() 函数  Python3 数字 描述 pow() 方法返回 xy(x的y次方) 的值. 语法 以下是 math 模块 pow() 方法的语法: import math mat ...

随机推荐

  1. 页面引用jquery中文变乱码的问题

    <script type="text/javascript" src="Js/JavaScript.js"></script>   方法 ...

  2. JIRA 的字段配置

    默认字段(Default Field Configuration)配置,最好都是非必填. 项目的字段关联字段方案. 字段方案针对不同问题类型,设置不同的字段配置策略. 在每个字段配置策略中去设置自定义 ...

  3. mongo获取lbs数据

    进入mongo目录执行./mongo 命令 #切换数据库use coachloc db.runCommand({geoNear : "coachloc" ,near : [113. ...

  4. MySQL 误删用户

    误删除root用户&误删除所有用户 #----------------------------------------------------------------------------- ...

  5. 1001 A+B Format (20 分)

    1001 A+B Format (20 分) Calculate a+b and output the sum in standard format -- that is, the digits mu ...

  6. jquery的相关应用

    1.jQuery获取鼠标事件源(万能) 1 //任意位置 2 3 $(document).ready(function(){ 4 5 $(document).click(function(){ 6 $ ...

  7. windows下面安装easy_install和pip教程

    方便安装whl:安装完成后,可以使用pip install   xxx.whl 安装一个python轮子 python扩展库的路径:Python\Python36\Lib\site-packages\ ...

  8. BigDecimal空指针异常——个人应用

    背景: 将数据库统计的数据,封装成了两个BigDecimal,此时要将两个BigDecimal进行运算.其中有一个没有数据的话,会报null(不管null值在前在后) 先上解决: 我把数据库的数据进行 ...

  9. js-传送file

    这是选择文件的标签 <input type="file" class="add-image-input"> 这是js实现传输文件 var addIm ...

  10. 1.HTML编码解码URL替换--代码整理

    public class HtmlCode { public static String encode(String str){ String s = ""; if (str.le ...