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.
if (a) then count++
- if allways compute if in brackets (statement is true). In this case, if element from array is bool True, then code in if-branch executecount++
+1 to var count.It's actually the BEST solution in generall for that kind of problem, don't know why so few likes. It's better then all "re" and ".split()" solutions, because it's can parse something like "video.google.com" -> and return "google", and not "video" for exapmle.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
My algorithmic solution (O-n).
Did not use the .split() and " ".join function on purpose.
Maybe you didn't check case with "None" before you do [-1]?