点击运行
#!/usr/bin/python #Define a function here. def temp_convert(var): try: return int(var) except ValueError, Argument: print "The argument does not contain numbers\n", Argument #Call above function here. temp_convert("xyz");
运行结果 :
正在执行...