Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python#68
Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python#68PratiAmalden wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
|
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
Sprint-1/Python/calculate_sum_and_product/calculate_sum_and_product.py
Outdated
Show resolved
Hide resolved
| for item in first_sequence: | ||
| if item in second_set and item not in seen: | ||
| seen.add(item) | ||
| common_items.append(item) |
There was a problem hiding this comment.
Code is correct.
Could consider taking advantage of built-in methods of a set -- less code and more efficient.
https://realpython.com/python-sets/
No description provided.