if statement for python2 location