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.
Sure, you could do that, but that would add a second full (unnecessary) pass over the input list arr whereas just calculating the number of zeros from the results of the first pass adds only constant time.
The same as my solution but what's that ominous isinstance(i, bool) for?
what the use of the isinstance here buddy ?
omg im so sorry i'll use it next time bro. thanks for the reminder
Please use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
In your solution, if you remove the 'Walrus operator',
nothing will change.
Everything worked,
and will continue to work without the 'Walrus operator'
There's definitely no need for isinstance as we're only checking for 1
It actually is
isinstance has no need here
'Walrus operator' capable make this solution more efficient oneliner. Open for arguments...
Neither best practice or clever. Same goes for the other solutions which are highly rated.
This was insighful
This comment is hidden because it contains spoiler information about the solution
thank you, appreciate it.
Loading more items...