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.
when you use if nums
python check if the list at least have one element and return true
if list is empty python return false so automatically the if block is not excuted
I did the same but one-lined. In the other hand and IMHO it's not good practices create variables with names reserved by Python, even if there seems to be no risk.
oh right thank you
In python, empty lists and strings are falsy.
Very readable with the most obvious use of the math library.
ok thanks for the explanantion
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thank you for the information. I will look into this some more.
Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
The error message is
True should equal False
and it means your function returnedTrue
when the expected value wasFalse
This comment is hidden because it contains spoiler information about the solution