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.
It was likely intentional. Appending to a list is O(1), so they create the string only once at the end using 'join'. However, concatenating two strings creates a new string each time, which can be a costly operation.
It should output
False
because "nodwvdwdddw nmldw bdwi fobdwodw vdwfdww ldwudwjsdwm" - the string contains bothdd
anddw
, which meansd
's best friend is inconsistent. I think in the later part of the comment you're referencing random tests - since these tests are generated randomly and not pre-programmed, it's important you provide as much information as you can when reporting them (what is thetxt
string? what isa
? what isb
? what leads you to believe it is blatantly wrong?). Lastly, based on your first sentence, please ensure that you're reading the error logs correctly - your_answer should equal expected_answer should be read in that order for Python. So the program is not telling you that you outputtedFalse
, but that you outputtedTrue
when it expectedFalse
.What does your code return if
a
is equal tob
. Read this: https://docs.codewars.com/training/troubleshooting