Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson5 #886

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Lesson5 #886

wants to merge 5 commits into from

Conversation

inf0rcer
Copy link

Выполнил задания easy и normal урок 5

try:
os.mkdir(dir_loc)
print(' -- папка успешно создана')
except:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не надо так делать, если не знаете какая ошибка может возникнуть пишите Exception


# Задача-2:
# Напишите скрипт, отображающий папки текущей директории.
path = os.getcwd()
def view_directories(path):
for _ in os.listdir(path):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listdir показывает все файлы, не только папки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants