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.
I need to stop using a lot of lines, this one resumes it all.
Very clean solution
good solution
the python reads all the line becaue all in same line and same interpretting so python read it if it another line there would be an eror
nice
" Please keep in mind that the test cases ensure that the number of people in the bus is always >= 0. "
But this condition: "So the return integer can't be negative." is not fulfilled.
If the last number in the test would be 100, for example, this code returns negative value
Yes, if you try using the stop variable after the list comprehension, it will raise a NameError exception since it is not declared on the current scope!
I understand, so does that mean that we can only use it inside the for loop?
The stop variable is defined in the list comprehension scope (at the 'for xxx in' part), it's 100% valid and shouldn't raise any VSC errors.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
simple but effective
good!
Nice, more compact than mine with a similar idea.
Loading more items...