Discuss / Python / 最简

最简

Topic source

def str2num(s):

    return float(s) if '.' in s else int(s)


  • 1

Reply