区别一:

          python 2.0 : 源码不规范,重复代码很多

python 3.0 : 源码精简,美观、优雅

区别二:

    PY2 : 有整型int、长整型long、

    py3:只有整型int

区别三:

      py2:range(3) --->[0,1,2]

        xrange(3)--->迭代器

      py3:range(3)--->range(0,3) 可迭代对象

python 2.0 与 python 3.0 区别的更多相关文章

  1. Python文件读取中:f.seek(0)和f.seek(0,0)有什么区别

    file.seek()方法标准格式是:seek(offset,whence=0)offset:开始的偏移量,也就是代表需要移动偏移的字节数whence:给offset参数一个定义,表示要从哪个位置开始 ...

  2. python学习笔记(0)python基础概念

    一.字符集 说字符集之前,先说下2进制的故事,计算机比较傻只认识2进制,什么是2进制,就是0,1,计算机只认识这俩数字,其他的都不认识,这样的0或1为一"位",规定8位为一个字节, ...

  3. python征程3.0(python对象)

    1.python使用对象模型来存储数据.构造任何类型的值都是一个对象.”尽管python被当成一种面向对象的脚本的编程语言“,但你完全能够写出不使用任何类和实例的脚本. python对象都拥有三个特性 ...

  4. Python 3.X简史——记录3.0之后的重要更新

    Python 3.0在2008年12月3日正式发布,在之后又经历了多个小版本(3.1,3.2,3.3……),本文梳理Python 3.0之后的新特性. 其实每个版本都有大量更新,都写出来要几百页,这里 ...

  5. python 2.4 与 python 3.0 的比较

    转过来,留着日后查看 [转自:]http://hi.baidu.com/autoitcn/blog/item/5f41973294b5fc4fac4b5f77.html python 2.4 与 py ...

  6. 基于python做的抓图程序1.0.00版本

    #coding=gbkimport urllibimport urllib2import reimport osimport time# import readline def getHtml(url ...

  7. HOWTO Use Python in the web — Python v3.0.1 documentation

    HOWTO Use Python in the web - Python v3.0.1 documentation mod_python¶ People coming from PHP often f ...

  8. Ghost.py 0.1b3 : Python Package Index

    Ghost.py 0.1b3 : Python Package Index Ghost.py 0.1b3 Download Ghost.py-0.1b3.tar.gz Webkit based web ...

  9. pyrailgun 0.24 : Python Package Index

    pyrailgun 0.24 : Python Package Index pyrailgun 0.24 Download pyrailgun-0.24.zip Fast Crawler For Py ...

  10. qrcode 4.0.4 : Python Package Index

    qrcode 4.0.4 : Python Package Index qrcode 4.0.4 Download qrcode-4.0.4.tar.gz QR Code image generato ...

随机推荐

  1. 函数的嵌套+nonlocal和global关键字(重点)

    1.在函数中声明函数 在内部函数中使用变量的时候, 查找顺序: 先找自己 -> 上一层 -> 上一层..全局 -> 内置 # 函数的互相调用 # def func1(): # pri ...

  2. Python笔记:字典的fromkeys方法创建的初始value同内存地址问题

    dict中的fromkeys()函数可以通过一个list来创建一个用同一初始value的dict. d = dict.fromkeys(["苹果", "菠萝"] ...

  3. Linux7.3系统 升级python到3.6使用ping主机脚本

    Linux7.3默认的python系统是2.7.5,然后想着升级使用python3.6.6 1 下载 2 解压  tar fx Python-3.6.6.tgz 3  configure --pref ...

  4. General error: 24374 OCIStmtFetch: ORA-24374: define not done before fetch or execute and fetch

    问题 $sql='insert into "test"("id") values(4)'; $res=$this->conn->query($sql ...

  5. [UGUI]图文混排(一):标签制定和解析

    参考链接: https://github.com/SylarLi/RichText/tree/master/Assets/Scripts 正则表达式: https://blog.csdn.net/ly ...

  6. Notes on Noise Contrastive Estimation and Negative Sampling

    Notes on Noise Contrastive Estimation and Negative Sampling ## 生成负样本 在常见的关系抽取应用中,我们经常需要生成负样本来训练一个好的系 ...

  7. uva-10340-水题

    题意:字符串匹配,看样例输入理解题意 直接循环 #include <string> #include<iostream> #include<map> #includ ...

  8. python中的format

    format()格式化字符串,将占位符替换成内容,举个例子: 1 a = "hello {0} welcome to {1}" 2 a1 = a.format("dlrb ...

  9. day08-字符串操作

    name = 'hello,world,WORLD! 123,你好' #capitalize()#首字母大写,其他全部变成小写,没有iscapitalize()方法print(name.capital ...

  10. Django--templates(模板层)

    模板语法: """ 模板语法: 变量:{{}} 1.深度查询 句点符 2.过滤器 {{value|filter_name:参数}} 标签:{% %} "&quo ...