Skip to content

Conversation

@rhyspowell
Copy link
Contributor

ATTENTION: before clicking "Create Pull Request" please submit some meta data, thanks!

Difficulty level (1-10): [5]
Estimated time spent (hours): [3]
Completed (yes/no): [yes]
I stretched my coding skills (if yes what did you learn?): []
Other feedback (what can we improve?): []


### Can I help you out with code reviewing?
We are still getting a pretty manageable number of PRs to be able to merge them all in ourselves, but we do want to give each PR a bit more of a code review. As we're pretty busy we want to turn this into a *community effort*. So if you want to help out merging PRs into our challenges branch, become a moderator (and mentor!), you can volunteer [on Slack](https://join.slack.com/t/pybites/shared_invite/enQtNDAxODc0MjEyODM2LTNiZjljNTI2NGJiNWI0MTRkNjY4YzQ1ZWU4MmQzNWQyN2Q4ZTQzMTk0NzkyZTRmMThlNmQzYTk5Y2Y5ZDM4NDU).
We are still getting a pretty manageable number of PRs to be able to merge them all in ourselves, but we do want to give each PR a bit more of a code review. As we're pretty busy we want to turn this into a *community effort*. So if you want to help out merging PRs into our challenges branch, become a moderator (and mentor!), you can volunteer [on Slack](https://pybit.es/community/).
Copy link
Collaborator

Choose a reason for hiding this comment

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

great catch, thanks!

Hint 2: use SequenceMatcher (imported) to calculate the similarity ratio
Bonus: for performance gain compare the first char of each tag in pair and continue if not the same"""
result = {}
result = {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

double variable

with open("rss.xml", "r") as f:
for line in f:
line = line.replace("-", " ").lower()
tags = TAG_HTML.findall(line)
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this override tags in each loop?

you can do it once, no loop: TAG_HTML.findall(f.read().lower())

singular = x
if x[0] == y[0] and x != y:
ratio = SequenceMatcher(None, x, y).ratio()
if x.endswith("s"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if this was required?

@bbelderbos bbelderbos merged commit fa6f5fb into pybites:community Oct 26, 2022
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