I have The same input. But this will not work on other type of strings like "i am 7 years".
по умолчанию функция вернёт None. не обязательно писать последнюю строчку в вашем коде.
only after your explanation I understood what task wants from me!
Hey guys, I am new to Python and want to learn some more. I am a bit confused by the above solution, how is it so simple? Could someone please explain how the function works exacly ? I am a bit confused by how the second and third parameters are applied. Thanks in advance
Do you mean "negative step" in range? Because no negative slice is used
Really creative way to tackle this, didn't think of using negative slices, nice.
'alr approved sometimeago'
I have the same solution as you, but you don't need to check if s.length===1, at least for this kata. Strange.
i use it but it dosen't work. write restart. can't understend why? plise help me guys.
I read it in book that string can be multiplied with integers
I would avoid having 2 returns, instead its better to have a variable ret and only return it at the end of the condition.
Very helpful error output! Clear, detailed, and insightful for the programmer. This should be more common!
Best Practice but adding a comment would have sent the solution to Mars!
single element array isn't a degree 1 poly
two element array is a degree 1 poly