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.
Yup. If you wanted to join with spaces then
' '.join(x)
, if you want to join with commas then','.join(x)
, and if you just want a string with everything smashed together then''.join(x)
. You get the idea :)So,
' '.join(x)
wherex
is the name of the list.Try str.join()
You're not taking into account 3x3 squares. Check the description.
Get a pen & papper and write out the test cases and try and develop your intuition. Is there a scenario where if one of the variables has a certain property the answer is one thing and if not another? etc.
If you return in both if and else inside a loop, your loop will run only once.
Read this