Python code to generate arithmetic expressions.