Работа с файлами
This commit is contained in:
9
python/files_and_sys.py
Normal file
9
python/files_and_sys.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Работа с файлами, директориями и os
|
||||||
|
|
||||||
|
|
||||||
|
#Получить расширение файла
|
||||||
|
os.path.splitext(filename)
|
||||||
|
|
||||||
|
#Получить файлы по маске jpg или png
|
||||||
|
|
||||||
|
for cer in dir.rglob("*.[jp][pn]g"):
|
||||||
Reference in New Issue
Block a user