From 150c4b8982c43fe0847259ec420d0ccfc893ec48 Mon Sep 17 00:00:00 2001 From: denis Date: Tue, 9 Dec 2025 14:31:08 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D1=81?= =?UTF-8?q?=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/files_and_sys.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 python/files_and_sys.py diff --git a/python/files_and_sys.py b/python/files_and_sys.py new file mode 100644 index 0000000..df7a531 --- /dev/null +++ b/python/files_and_sys.py @@ -0,0 +1,9 @@ +# Работа с файлами, директориями и os + + +#Получить расширение файла +os.path.splitext(filename) + +#Получить файлы по маске jpg или png + +for cer in dir.rglob("*.[jp][pn]g"): \ No newline at end of file