Skip to main content
Commonmark migration
Source Link

##Sage, 35 bytes

Sage, 35 bytes

lambda a,b,v=vector:norm(v(a)-v(b)) 

This function takes 2 lists as input and returns a symbolic expression. The distance is calculated by performing vector subtraction on the lists and computing the Euclidean norm of the resultant vector.

Try it online

##Sage, 35 bytes

lambda a,b,v=vector:norm(v(a)-v(b)) 

This function takes 2 lists as input and returns a symbolic expression. The distance is calculated by performing vector subtraction on the lists and computing the Euclidean norm of the resultant vector.

Try it online

Sage, 35 bytes

lambda a,b,v=vector:norm(v(a)-v(b)) 

This function takes 2 lists as input and returns a symbolic expression. The distance is calculated by performing vector subtraction on the lists and computing the Euclidean norm of the resultant vector.

Try it online

Source Link
user45941
user45941

##Sage, 35 bytes

lambda a,b,v=vector:norm(v(a)-v(b)) 

This function takes 2 lists as input and returns a symbolic expression. The distance is calculated by performing vector subtraction on the lists and computing the Euclidean norm of the resultant vector.

Try it online