9
Jim Wright
http://www.reviewboy.com/
Last seen 8 years ago
Member for 9 years, 8 months, 21 days
Difficulty Normal
Learned BASIC on the TRS-80 in the 1970s. Now giving Python a try.
Ooh, that's nice. this is much more readable than mine.
return min([(-1 * ltext.count(c), c) for c in string.ascii_lowercase])[1]
More
Nice! Very similar to what I did. Is there an advantage to using a.lower().replace() instead of a.replace().lower()?
More
Terrific solution! I aimed for the same logic, but plowed through it the hard way; your code is so much more elegant. I love the use of map()!
More
Nice! You can yank the list and [get it all in one loop](http://www.checkio.org/mission/digits-multiplication/publications/bryukh/python-3/convert-and-iterate/?ordering=most_voted), if you want:
result = 1
for digit in str(number):
result *= int(digit) if int(digit) else 1 # multiply by 1
More