def print_mathml(expr, **settings):
 s = MathMLPrinter(settings)
 xml = s._print(sympify(expr))
 s.apply_patch()
 pretty_xml = xml.toprettyxml()
 s.restore_patch()
 print(pretty_xml)

def print_mathml ( expr , ** settings ) : s = MathMLPrinter ( settings ) xml = s . _print ( sympify ( expr ) ) s . apply_patch ( ) pretty_xml = xml . toprettyxml ( ) s . restore_patch ( ) print ( pretty_xml )
prints a pretty representation of the mathml code for expr examples .