Created
January 25, 2022 12:40
-
-
Save x10an14/bc950f4e8bdd66fa986b3500933eaefd to your computer and use it in GitHub Desktop.
Forskjell på filosofi
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
liste_tall = [1, 2, 3, 4, 5, 6] | |
def summere_imperativt(liste): | |
sum = 0 | |
for tall in liste: | |
sum += sum | |
return sum | |
def summere_deklarativt(liste): | |
sum = reduce(x + y, liste) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment