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

Perf web_demo.py #1325

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Perf web_demo.py #1325

wants to merge 3 commits into from

Conversation

SuZui-cn
Copy link

原代码使用了enumerate函数来获取索引和元素,然后再通过索引修改原列表中的元素。这种做法会导致每次循环都要进行索引查找和修改操作,效率较低。 修改后的代码将处理后的元素添加到新的列表中,避免了每次循环都要修改原列表的操作,提高了效率。

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.

1 participant