W3School TIY Editor

  • W3School 在线教程
  • 改变方向
  • 暗黑模式
 
x = "Hello"
try:
  print(x.toUpperCase())
except AttributeError:
  print("错误!字符串没有 toUpperCase 方法!")
except:
  print("发生了其他错误")