1.忘记在 if , elif , else , for , while , class ,def 声明末尾添加 “:”
2.使用 = 而不是 ==,= 是赋值操作符而 == 是等于比较操作
3.尝试使用Python关键字作为变量名
Python3的关键字有:and, as, assert, break, class, continue, def, del, elif, else, except, False, finally, for, from, global, if, import, in, is, lambda, None, nonlocal, not, or, pass, raise, return, True, try, while, with, yield等
4.++ 或者 -- 自增自减操作符
例如 C++ , Java , PHP 等其他的语言,也许你会想要尝试使用 ++ 或者 -- 自增自减一个变量。在Python中是没有这样的操作符的
此错误会经常出现,属于通用错误,可查看其他报错信息进行辅助排查

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案