24
Jarrett Glass
Last seen 7 months ago
Member for 8 years, 11 months, 19 days
Difficulty Normal
Work in Clinical Research for immune oncology-focused biotech firm. Recently accepted to grad school, and soon to be starting an M.S. in Bioinformatics. Here to work on my Python skills and algorithm development.
Mine was VERY similar to this, except for taking out your precondition by combining on the return line --
return False if text == typed else bool(re.search(..."
More
Nice! I had a similar approach, but I like how you did the sum generator on the last line. Wish I'd thought of that instead of using two sum() statements.
More
... Dang it, I didn't think about True = 1/False = 0. More elegant to just sum() it up than do a list.count(True) like I did. Nice!
More
Love seeing code that teaches me something new. Had no clue about 'bisect' until this one!
More
... Well that is short, sweet, and simple. My For loop feels clunky by comparison.
More
Instead of "
> math.sqrt((i+1)*(i+1) + (j+1)*(j+1))
it would have been a lot easier to use
> math.hypot(i+1,j+1)
... Not sure if you did that intentionally or not, just throwing it out there.
More