mirror of
https://gitea.com/Lerking/python-crash-course.git
synced 2026-03-14 10:00:07 +01:00
Updated. /JL
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
A short description of the 3 main programming paradigms in Python
|
||||
- Object Oriented Programming - OOP
|
||||
- Procedure Oriented programming - POP
|
||||
- Procedure Oriented Programming - POP
|
||||
- Functional programming
|
||||
"""
|
||||
|
||||
@@ -120,3 +120,6 @@ if __name__ == "__main__":
|
||||
return mylist[0] + sum_the_list(mylist[1:])
|
||||
|
||||
print(functools.reduce(lambda x, y: x + y, mylist))
|
||||
|
||||
# You don't have to adhere to 1 specific paradigm.
|
||||
# They can be mixed in an application, and usually are.
|
||||
|
||||
Reference in New Issue
Block a user