Python执行报错汇总

Python执行报错汇总

  • 1. NameError: name 'y' is not define
  • 2.

1. NameError: name ‘y’ is not define

content = input('输入(y / n): ')

报错日志

Traceback (most recent call last):
  File "../../pack_param_json_v4.py", line 152, in <module>
    content = input('输入(y / n): ')
  File "", line 1, in <module>
NameError: name 'y' is not define

使用python2环境执行脚本,输入应该是’y’ 带引号的, python3则不用输入引号

https://www.cnblogs.com/mxh1099/p/5412299.html

2.

你可能感兴趣的:(python,python,input)