斜杠(/)运算的结果是浮点型
双斜杠(//)的输出结果是整形
Python 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 4//3
1
>>> 4/3
1.3333333333333333
>>>
斜杠(/)运算的结果是浮点型
双斜杠(//)的输出结果是整形
Python 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 4//3
1
>>> 4/3
1.3333333333333333
>>>