python -V 查看版本显示NameError: name 'python' is not defined

python -V 查看版本显示NameError: name 'python' is not defined

img


求解答一下为什么?怎么解决?

你在命令行输入python,打开的交互式界面最前面就显示了版本了,3.7.1
或者直接 python -V

img

试试输入
python -h
查一下查版本的命令

img

img


在这里输入的python后面写 -V,
进入解释器后就属于两个变量的减法运算了。