def str2float(s): return int(s.replace('.','')) * 10**(s.find('.')-len(s)+1) s = "123.456" print(str2float(s))
Sign in to make a reply
含蛋碱鸡