美文网首页
python2和python3 除法运算的机制不同

python2和python3 除法运算的机制不同

作者: sudacq | 来源:发表于2018-07-30 20:23 被阅读0次

    python2

    $ python
    Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
    [GCC 7.3.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 1/10
    0
    

    python3

    $ python3
    Python 3.6.5 (default, Apr  1 2018, 05:46:30)
    [GCC 7.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 1/10
    0.1
    

    相关文章

      网友评论

          本文标题:python2和python3 除法运算的机制不同

          本文链接:https://www.haomeiwen.com/subject/eslqvftx.html