• ###### ArturoMozzafiatocommented on "Take a Ten Minutes Walk" python solution

It's not optimal, you are right! But actually, it only needs to iterate through the list 4 times. The len() method in python does not need to iterate through the array to find the length, but python caches the length in an attribute!

• ###### jminchew97commented on "Take a Ten Minutes Walk" python solution

Very clever, smart thinking. Didnt even realise they would all have to be equal to get back to same spot facepalm.

• ###### nevvyncommented on "Take a Ten Minutes Walk" python solution

Less efficient than it could have been, but given the max length of the walk, probably not worth worrying about here.
In general x times the work when not needed is not what you should aspire to.

• ###### MatuMikeyscommented on "Take a Ten Minutes Walk" python solution

this iterates through the list a total of 5 times so while it looks pythonic, it's not optimal. But a very readable solution nonetheless :).

• ###### Varkolincommented on "Convert boolean values to strings 'Yes' or 'No'." python solution

I think that solution so clever.

• ###### jennymphocommented on "Take a Ten Minutes Walk" python solution

this is very clever.. this makes it sounds like the exercise is easy bwhen i built something so complicated to achieve the same result!!

• ###### killergirl231commented on "Convert boolean values to strings 'Yes' or 'No'." python solution

I really admire the way you approach problem

• ###### DevidBrowncommented on "Convert boolean values to strings 'Yes' or 'No'." python solution

Oh my God! It's brilliant!

• ###### getout77commented on "Convert boolean values to strings 'Yes' or 'No'." python solution

Mine is the same. But I used tuple instead of list.

• ###### Blind4Basicscommented on "Count by X" python solution

because that's a code working only for python 2

• ###### jeremynslcommented on "Count by X" python solution

This code doesn't seem to pass when I copy and paste it.
`range(1, 6) should equal [1, 2, 3, 4, 5]`

?

• ###### RUGyroncommented on "Take a Ten Minutes Walk" python solution

too many list countings. Not for production as i think

• ###### russelljjadamscommented on "Take a Ten Minutes Walk" python solution

Lol. It looks like you're trying to program in C.

• ###### harpan127commented on "Take a Ten Minutes Walk" python solution

Stop flexing lol, mine was like 20 lines

• ###### russelljjadamscommented on "Take a Ten Minutes Walk" python solution

Yeah, that does make sense. I try to solve these in the least amount of effort though. I can't be bothered to import a module.