evaluation of expression using python