On Wed, 27 Sep 2017 at 13:58 Thomas Jollans <t...@tjol.eu> wrote: > > Reproducing the original string exactly the best I've managed is 260: > > > > t,f,a,o,n='True','False','and','or','not' > > The Not is capitalized in the original string. >
I guess you didn't try it? (or see `upper()` in the body of the `for` below) > l=[" Boolean Operators\n"+"-"*24] > > for x in [(l,p,r)for p in(a,o)for l in(t,f)for r > in(t,f)]+[(n,t),(n,f)]:x=' > > '.join(x);l+=[x[0].upper()+x[1:]+" is "+str(eval(x))] > > for i in 12,9,5,0:l.insert(i,'') > > print('\n'.join(l)) -- -- Matt Wheeler http://funkyh.at -- https://mail.python.org/mailman/listinfo/python-list