unknown hace 3 meses
padre
commit
2e16a3f463
Se han modificado 1 ficheros con 29 adiciones y 0 borrados
  1. 29 0
      courses/python_func/higher_func_2.py

+ 29 - 0
courses/python_func/higher_func_2.py

@@ -0,0 +1,29 @@
+
+'''
+Функции all() и any()
+'''
+
+def func_1():
+    print(all("A" in x.upper() for x in input().split()))
+
+
+def func_2():
+    lst = input().split()
+    print(all(int(lst[i]) > int(lst[i + 1]) for i in range(len(lst) - 1)))
+
+
+def func_3():
+    lst = input().split()
+    print(any([s.lower().endswith('ought') for s in lst]))
+
+
+
+def main():
+    # func_1()
+    # func_2([18, 11, 6, 5, 4, 3])
+    # func_2()
+    func_3()
+
+
+if __name__ == '__main__':
+    main()