On to serious business. A 117 byte solution to the challenge is given by:
j=''.join;seven_seg=lambda z:j(j(' _ |_|_ _| |'
[ord("'\xa5\x8f\xb1\xdb\xad\xbdi\x03K\x9f'"[int(a)])%u:][:3]for a in z)
+"\n"for u in(3,14,10))
where I have written the encoded string in a way that blogger would not complain about and added some line breaks as blogger breaks it up at inappropriate places. Last night, I couldn't figure out how to generate the string with the \x03 character included. (Today, after the challenge was over, I simply did print chr(3) in a Python interpreter and cut and paste the appropriate character in the string.) My attempts at generating the encoded string and printing to a file with the \x03 character included always resulted in an empty file.
So, what I did was to subtract one from each character before writing to the file ... and then change "ord" to "-~ord" to shift back the values to the right ones ... but thereby adding two extra characters. As this was already a solution shorter than those posted, I decided it was time to give up and try to get some much needed sleep.
Note that the string
' _ |_|_ _| |'is shorter than the "usual one" where the 3-character strings start on an even index.
Here's how to generate the encoded string (with 33 replacing 3; replace with cut-and-paste after):
encoded = ''.join(chr(i) for i in dec_list)
These decimal numbers encode the following
Thus the number '0' is represented by (0, 11, 5) which are the beginning indices of 3-character strings in
' _ |_|_ _| |'. Thus,
'0' = (' _ ', '| |', '|_|').
I was going to wait until the official announcement to post this but thinking of how curious I was earlier on to eventually find out what I thought would be the winning solution (120 character), I decided it was time to do it.
Note For a more detailed explanation, see the next entry at Journey to 117