Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
it might not work on some random tests, it should be testing for final length not for length of an input
if i didn't check for final length my solution would be like... 79 instead of 85 characters long
tbh tho, I didn't use strip because this test is stupid and only uses spaces
nice, BRO
I think you just need the .replace(' ','') in the expression of the if statement. No need to make the computer do extra work there.
don't think you need strip() if your next step is replacing ' ' with ''
This comment is hidden because it contains spoiler information about the solution
Great solution! Don't think the strip() is necessary, and fstrings a more gracious way for prepending the hashtag at the beginning of the string. Also, as someone else mentioned below, it'd have to check if the resulting string s is of size len(s) < 140 instead of len(s) < = 140 since the description states that the final (aka with hashtag) string is of length smaller or equal to 140 characters.
Because adding an additional variable to store the final result in would require an additional line.
Does that mean mine could also be wrong, using your test? please verify to help me learn more.
сын маминой подруги lol
wrong solution, this code would return False for a string "a a a aa dab wd qwudbhq wkjdb jkqwdbkdb 948djq9w84 d9*b84wqjd1b89 q4wkj89db jk8qwdj k8qwbd 8kj5qwbd8 q1wb9jkd 2q5w9jkdb 1qwjb8d 1469b19 89589" which is valid by description, because final string is shorter than 140 chars
great idea!
ахахах то же самое подумала
:)
бля всегда найдется сын маминой подруги который решит в одну
Really smarter approach, I used split() then map() to join() afterwards :). Your approach is..hands down,way better.
Loading more items...