7 kyu
Remove Unnecessary Characters from Items in List
672 of 673BrianC
Loading description...
Fundamentals
Regular Expressions
Lists
Strings
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
python new test framework is required. updated in this fork
Approved
This comment has been hidden.
description could be better
Thats legit too hard for a 7 kyu im a 5 kyu and even after i hit up google and stackoverflow i didnt get an answer.
I saved so much time by unlocking this solution... I'm currently 6kyu, however this 7kyu kata was a bit hard for me.
I like this kata :)
I just did this kata and had a similar solution to those posted(though longer and uglier). It only works for 4 digit prices though. When I ran my solution I came across a bunch of prices with 5 or 3 digits, which messed up my whole algorithm . It was not clear to me that there would be prices of varying length (which make the re pattern more complex and this kata way harder)
It's not explained anywhere why
$5.$6.6x.s4
becomes$56.64
and not$5.664
or$5664
or$566.4
Also, leading zeros don't make much sense (as alread reported earlier)
Why I'm need to import re if i don't use them?
Fixed. Thank you for reporting.
Hi, I have a couple of suggestions about this kata:
The first point is still outstanding.
that was fun =)
Hi, the test cases are insufficient:
remove_char("$12.00$$$...")
should be$12.00
. This case is neither excluded nor tested. Other examples"$$12.$A12$0"
, ".A03456$",...Regards,
suic
Hello,
I think I've fixed the issue. Wasn't able to use regex completely, but I'll figure it out eventually.
As for the suggestion, how do I add random tests? I know how to create random strings of digits and characters, but how do I get CodeWars to recognize the solution if it's random? Thanks!
This comment has been hidden.