Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfix: space count in strings/word_occurrence.py #1896
Conversation
Co-Authored-By: Christian Clauss <cclauss@me.com>
|
Sorry but I do not believe this PR is doing anything useful. The proposed code is currently not popping out the space character but is instead popping out the empty string. I do not see how this algorithm is putting space or the empty string into occurrences. I do not believe that len(occurrences) will change before and after the pop. We need a doctest that proves this change is needed. |
|
Hey @cclauss , I found that after spliting the space characters create blank strings. It wound be hard to found and remove the spaces from the whole string. So let them store them as |
Co-Authored-By: Christian Clauss <cclauss@me.com>
|
Also, please fix the spelling of |
|
@cclauss Seems like, there is no need o |
|
Awesome detective work here to find and fix a hard to spot bug! Thanks for your contribution. |

darkmatter18 commentedApr 20, 2020
•
edited
Describe your change:
Fixed the space count in the strings/word_occurrence.py
Checklist:
Fixes: #1895Fixes: #1895