Skip to content

exersises#22

Open
KpoDja wants to merge 1 commit intolearnpythonru:mainfrom
KpoDja:main
Open

exersises#22
KpoDja wants to merge 1 commit intolearnpythonru:mainfrom
KpoDja:main

Conversation

@KpoDja
Copy link
Copy Markdown

@KpoDja KpoDja commented Feb 19, 2023

No description provided.

@@ -3,7 +3,7 @@

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не нужно в репозиторий добавлять служебные файлы

# ???

print(f"{len(groups)} всего групп")
for index, group in enumerate(groups):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

можно в enumerate через start указать номер с которого начинать

]
# ???

for student in students:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Тут квадратичная сложность, потому что count будет весб список перебирать каждый раз. Лучше такого избегать

]
# ???

duplicates = [x for i, x in enumerate(students) if i != students.index(x)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

аналогично, index это как еще один цикл. Итого цикл в цикле

count_list = []
for dic_student in s_class:
count_list.append(dic_student["first_name"])
count_dic = Counter(count_list)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

можно сразу в коунтер добавлять без промежточного списка

# ???

word_one = 'Архангельск'
glasniye = ["а", "я", "у", "ю", "о", "е", "ё", "э", "и", "ы"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

можно просто написать буквы слитно

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