Fixing syntax error while making with python 2