-
Notifications
You must be signed in to change notification settings - Fork 77
Lesson_3 files #599
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
base: master
Are you sure you want to change the base?
Lesson_3 files #599
Conversation
val = rnd.randint(1, 5) | ||
resdict.update(i = val) | ||
|
||
fill_dict(10000000) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нет аналитики
минус балл
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я еще дописал функцию (fill_dict_1 ) заполняющую словарь через генератор и получил время все равно хуже, чем заполнение списка. Я так понимаю, что работа со списком реализована оптимальнее.
Execution time for <function fill_list at 0x000001F2723E28B0> is 7.2645058 sec
Execution time for <function fill_dict at 0x000001F2723E29D0> is 8.423135600000002 sec
Execution time for <function fill_dict_1 at 0x000001F2723E2B80> is 8.650617299999999 sec
else: | ||
break | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
хорошо
continue | ||
else: | ||
s.add(inp_str[i:j]) | ||
print(s) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
хорошо
if answer.lower() == 'y': | ||
continue | ||
else: | ||
break No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
выполнено
Lesson_3 files