|
@@ -5,11 +5,16 @@ def test_1():
|
|
|
print(list(filter(lambda x: x[0] == x[-1], a)))
|
|
|
|
|
|
|
|
|
+def filter_numbers(lst: list):
|
|
|
+ return list(filter(lambda x: x%2 == 0 or abs(x) > 100, lst))
|
|
|
+
|
|
|
+
|
|
|
def main():
|
|
|
- pass
|
|
|
+ numbers = [-100, 2, -300, -400, 5, -60, -61, -101, 101]
|
|
|
+ print(filter_numbers(numbers))
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- # main()
|
|
|
- a = [1, 2, 3, 4, 5]
|
|
|
- print(list(filter(None, a)))
|
|
|
+ main()
|
|
|
+ # a = [1, 2, 3, 4, 5]
|
|
|
+ # print(list(filter(None, a)))
|