计算三维空间某点距离原点的欧式距离

import math
def distance(n,m,l):
    d = math.sqrt(n**2+m**2+l**2)
    return d
x,y,z=input().split(",")
d=distance(float(x),float(y),float(z))
print("{:.2f}".format(d))
原文地址:https://www.cnblogs.com/670ling/p/12802852.html