30
Pactp
Last seen 2 months ago
Member for 1 year, 2 months, 10 days
Difficulty Easy
Clear and simple solution.
How about check for "non digit"?
if 0 <= digit < radix:
More
nice solution, but it does not work on:
assert cut_sentence("Hi my name is mystery", 16) == "Hi my name is..."
More
nice & clear
list comprehension can be changed to generator
More
Nice abstract solution! It can be easily modified for NxN tableau and for 3D variant :).
More
good oneliner, it seems this would be a bit simpler
return (first in word) and word.find(first) + 1 == word.find(second)
More
Simple, nice and short. It's easy to convert it to oneliner:
long_repeat = lambda s: max(len(list(g)) for _,g in groupby(s))if s else 0
More
Nice, short and clear enough to illustrate chain & zip usage
More