Created
March 13, 2017 21:33
-
-
Save cjw296/4b7850ab0d66690d2cf5dacea03ad563 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dot(l, k): | |
if len(l) != len(k): | |
return 0 | |
if not (l or k): | |
return 0 | |
return l[0]*k[0] + dot(l[1:], k[1:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment