In python, how do you pretty print a dictionary such that dictionary keys are not-case sensitive?
For example, Apple
with a big letter A
and apple
with a small letter a
will be near each-other.
The results should be printed in the same style as the following example:
d = {
'approx' : 'approximately' ,
'dfrac' : 'display fraction' ,
'Leftrightarrow' : 'Left and right arrow' ,
'rangle' : 'right angle' ,
'vDash' : 'vertical turnstile with double dash' ,
'vdash' : 'vertical turnstile with single dash' ,
'lhd' : 'left lazy head' ,
'lim' : 'limit' ,
'xleftarrow' : 'left arrow with parameter input' ,
'varlimsup' : 'variable limit supremum' ,
'simeq' : 'similar or equal' ,
'iff' : 'if and only if' ,
'lt' : 'less than' ,
'notin' : 'not element of or in' ,
'equiv' : 'equivalent to' ,
'ge' : 'greater than or equal' ,
'Gamma' : 'big uppercase Gamma' ,
'cong' : 'congruent' ,
'infty' : 'infinity' ,
'subsetneq' : 'subset of and not equal to' ,
'prod' : 'product' ,
'varepsilon' : 'variable epsilon' ,
'sum' : 'summation' ,
'mathbb' : 'mathematics black board bold' ,
'le' : 'less than or equal to' ,
'bar' : 'over bar' ,
'lbrace' : 'left brace' ,
'mu' : 'greek letter mu' ,
'cdots' : 'centered dots' ,
'mp' : 'minus plus' ,
'lnot' : 'logical not' ,
'spadesuit' : 'spade suit symbol' ,
'ell' : 'script el el' ,
'subseteq' : 'subset or equal' ,
'rceil' : 'right ceiling' ,
'vdots' : 'vertical dots' ,
'mapsto' : 'maps to arrow' ,
'genfrac' : 'generalized fraction' ,
'varliminf' : 'variable limit infimum' ,
'rVert' : 'right vertical bar' ,
'iint' : 'integral integral' ,
'iiint' : 'integral integral integral' ,
'lVert' : 'left vertical bar' ,
'ddot' : 'double diagonal dot' ,
'varnothing' : 'variable nothing' ,
'frac' : 'fraction' ,
}
In this particular example, the inputs (keys) are LaTeX commands and the outputs (values) are English phrases with words spelled out in full such that the key is a sub-sequence formed by deleting zero or more letters from the full English phrase.