Discuss / Python / 交作业

交作业

Topic source
def str2num(s):
	try:
		return int(s)
	except Exception as e:
		return float(s)

  • 1

Reply