3 ms·
Slightly shorter: print '\n'.join([" "abs(4-i) + ""(9-abs(8-i2)) for i in range(9)])
by joss82 16y ago
Slightly shorter:
print '\n'.join([" "abs(4-i) + ""(9-abs(8-i2)) for i in range(9)])
- BoppreH 16y agoThat actually doesn't do the trick because there is only one line 9 asterisks wide when it should be two. I don't think you can accomplish this replacing max/min with any combination of abs.
- joss82 16y agoYou're right, but I couldn't correct it right away (because of noprocrast and life). Also, formatting was wrong: print '\n'.join([" "abs(int(4.5-i)) + ""(10-abs(9-i2)) for i in range(10)])