• ###### cobra13commented on "Convert number to reversed array of digits" python solution

Hey thanks for letting me know, this whole time I thought the solutions you can see matched your version. I know in 3 this would still work if put all this in another parenthesis and "list" in front, which is still cool

• ###### akar-0commented on "Convert number to reversed array of digits" python solution

No, it is Python 2. In Python 3 map returns a generator and not a list.

• ###### cobra13commented on "Convert number to reversed array of digits" python solution

Is this python 3? I didn't know you could do this 😮

• ###### Asanosukeeycommented on "Reverse words" python solution

not if it can't solve the problem in the first place.
use this test case:
" A stitch in time saves nothing"

• ###### Asanosukeeycommented on "Reverse words" python solution

This is actually the best solution because it covers sentences that have spaces of variable length

• ###### AbdallahSiyabicommented on "Summing a number's digits" python solution

Hi guys,

When I run this code, I get a TypeError exception:bad operand type for abs(): 'generator'
Is this to do with Python 3+?

• ###### matt_dvccommented on "Bit Counting" python solution

I thought I was clever ;D

• ###### caxarok99commented on "Bit Counting" python solution

Пожалуй я даже не буду показывать своё решение. Стыдно.

nice

• ###### HarryDaCodercommented on "Bit Counting" python solution

You learn something new everyday... This is a very clever solution, props to you mate.

• ###### Luck_Dragoncommented on "Bit Counting" python solution

Oh man, I did not know the bin function. That would have made my life so much easier. Welp, now I know, thank you!

• ###### MatthewCochranecommented on "Can you get the loop ?" python solution

This comment is hidden because it contains spoiler information about the solution

• ###### MrAyushBajpaicommented on "shorter concat [reverse longer]" python solution

He's given a,b = b,a. It means assign the value of a to b, and that of b to a. Or in other words, swap the value between a and b.

• ###### __str__commented on "nickie's Python solution for "Convert boolean values to strings 'Yes' or 'No'."" kumite

The binary values of `True` and `False` can be referred to as `1` and `0` respectively. Basically, the solution is taking the element of the list, `['No', 'Yes']`, in that respective index, `[b]`, hence, the use of another pair of square brackets.