python-使用技巧
长戟破空
THE WORLD IS JUST WHAT IT IS.
展开
-
python中的除法运算‘/‘的结果值始终为浮点数
python中的除法运算’/'的结果值始终为浮点数,即使能够整除:C:\Users\lenovo>pythonPython 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> type(2/2)<原创 2021-05-30 20:06:40 · 4481 阅读 · 0 评论 -
win10命令行查看python安装路径
命令行输入python进入python交互式环境,然后依次输入以下两行代码:import sysprint(sys.executable)即可在命令行窗口打印出python安装路径:C:\Users\lenovo>pythonPython 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32Type "help", "copyright", "credits"原创 2021-05-26 21:04:45 · 1717 阅读 · 0 评论