-
-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
fixed the issue in strings/join.py #12434
fixed the issue in strings/join.py #12434
Conversation
Added corresponding doctest |
@RajdeepBakolia2004 Please fill pull_request_template that I added to the end of your PR description @cclauss We don't have any problems with automatic PRs closing by the robot if there is no template or nothing is filled in there? My PR #12450 was closed as invalid when I forgot to fill template, but I see some opened recent PRs with the same problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix my comment above
sure thank you for reminding me
…________________________________
From: Maxim Smolskiy ***@***.***>
Sent: 29 December 2024 18:23
To: TheAlgorithms/Python ***@***.***>
Cc: Rajdeep Bakolia ***@***.***>; Mention ***@***.***>
Subject: Re: [TheAlgorithms/Python] fixed the issue in strings/join.py (PR #12434)
External Email
@MaximSmolskiy requested changes on this pull request.
Please fix my comment above
—
Reply to this email directly, view it on GitHub<#12434 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCL2ZK27UTSPWLSXGASSQQ32H7WDLAVCNFSM6AAAAABTSB4BAOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMRUHE2DCNBYGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
We want PRs to be autoclosed for no checkboxes are checked to limit spam PRs. Maintainers should be able to reopen closed PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RajdeepBakolia2004 Thanks for fix, tried to make it more elegant and shorter
Thank you 🙂
…________________________________
From: Maxim Smolskiy ***@***.***>
Sent: 29 December 2024 19:05
To: TheAlgorithms/Python ***@***.***>
Cc: Rajdeep Bakolia ***@***.***>; Mention ***@***.***>
Subject: Re: [TheAlgorithms/Python] fixed the issue in strings/join.py (PR #12434)
External Email
@MaximSmolskiy approved this pull request.
@RajdeepBakolia2004<https://github.com/RajdeepBakolia2004> Thanks for fix, tried to make it more elegant and shorter
—
Reply to this email directly, view it on GitHub<#12434 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BCL2ZKYIGGMDQTUSTDPLDZL2H73ANAVCNFSM6AAAAABTSB4BAOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMRUHE2DQNRZGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The issue was that join() function was not working as the join method of string due to strip method which truncates from end
now whenever we have empty strings in our separated list it was just adding multiple terminator and all the terminator where getting strip which was different form the join method so a for loop was run for the entire list except the last element in which case it just add the last element and it also take care of the case when the list is empty
It fixes the bug in the join.py file
Fixes #12408
Describe your change:
Checklist: