We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b2392c commit fe8f3a4Copy full SHA for fe8f3a4
1 file changed
Manhattan_distance/Python/jcla1/manhattan_distance.py
@@ -0,0 +1,3 @@
1
+def manhattan_distance(p, q):
2
+ if len(p) != len(q): return 0
3
+ return sum([abs(p[i] - q[i]) for i in xrange(len(p))])
0 commit comments