Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
for f in str.isupper, str.islower: solution in Clear category for Seven Segment by flpo
segments = list(map(set, [
'bc',
'abged',
'abgcd',
'fbgc',
'afgcd',
'afgcde',
'abc',
'abcdefg',
'abcdfg',
'abcdef'
]))
def seven_segment(*args):
r = 1
for f in str.isupper, str.islower:
lit, broken = ({s.lower() for s in segs if f(s)} for segs in args)
r *= sum(lit <= s <= (broken | lit) for s in segments)
return r
May 31, 2018
Comments: