1
0
forked from tdwojak/Python2017
Python2017/labs05/task00.py

14 lines
227 B
Python
Raw Normal View History

2017-12-16 06:52:54 +01:00
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
def suma(liczby):
2018-01-26 14:43:35 +01:00
assert len(liczby) > 0
a=reduce(lambda a, b: a+b, liczby)
return a
2017-12-16 06:52:54 +01:00
def main():
2018-01-26 14:27:56 +01:00
print(suma([1, 2, 3, 4]))
2017-12-16 06:52:54 +01:00
if __name__ == "__main__":
main()