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

p.175 오타는 아니지만.. #39

Closed
PudgeKim opened this issue Oct 15, 2020 · 1 comment
Closed

p.175 오타는 아니지만.. #39

PudgeKim opened this issue Oct 15, 2020 · 1 comment

Comments

@PudgeKim
Copy link

for i, num in enumerate(nums):
if target-num in nums_map and i != nums_m-nuap[target-num]:
return nums.index(num), nums_map[target-num]

여기서 마지막 부분인 nums.index(num)는 그냥 i로 해도 되지않나요? 이게 좀 더 가독성이 좋지않나 싶어서.. ㅎㅎ

@likejazz
Copy link
Collaborator

네, 말씀하신대로 수정하는 편이 가독성도 좋고 성능도 좀 더 좋아질 수 있겠네요.
알려주셔서 감사합니다. 반영하도록 하겠습니다.

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

No branches or pull requests

2 participants