I nearly choked laughing. Thank you for this.
I solved the "regular" 5 kyu version in 70 lines... LOL ! We're far from a single line :(
Try searching for "one line task" or "code golf". I don't really know any 'simple' golf katas :D Maybe something like this one.
Ok, thanks for the tip. Could you give me a link to a simple golf kata for me to begin ?
Do that. This is code golf kata, which requires more knowledge and practise than normal katas. If you've never done golf katas, stay away from this one for now ;-)
OMG. So, it's impossible to use a regular function... I will first try the simple version ;)
ok ;) Thank you for the answer. Does "no newline" mean that I have to write the code in one single line ?
you write either a lambda or a regular function, it's totally up to you. If your question is actually "what a lambda is?"... I guess you shouldn't try code golf kata yet, then... ;o
Hi everybody. I don't understand what "is_check=lambda board: False" in the first line of the solution means.
Am I not supposed to write a function def is_check(board) where board is a list and return a boolean ?
This comment is hidden because it contains spoiler information about the solution
Will the interpreter optimise this to only call gl once per string? Or does it call gl for every comparison? If it's the latter, this is not at all best practice.
Please link to the duplicate when commenting.