def python_is_optimized():
cflags = sysconfig.get_config_var('<STR_LIT>') or '<STR_LIT>'<EOL>final_opt = "<STR_LIT>"<EOL>for opt in cflags.split():<EOL><INDENT>if opt.startswith('<STR_LIT>'):<EOL><INDENT>final_opt = opt<EOL><DEDENT><DEDENT>return final_opt and final_opt != '<STR_LIT>'<EOL>
Find if Python was built with optimizations.