📌  相关文章
📜  如何修复python代码示例中的valueerror

📅  最后修改于: 2022-03-11 14:45:59.452000             🧑  作者: Mango

代码示例1
#Instead of
a = int(input("What is x?"))
#Put
try:
      a = int(input("What is x?"))
except ValueError:
  print ("Insert ValueError message here")
#This way your program won't crash