Way I use very often is loc argument in the legend function. String input works well:
plt.legend(loc = "upper left")
As documentation says, for the string referencing you can use:
=============== ============= Location String Location Code =============== ============='best' 0'upper right' 1'upper left' 2'lower left' 3'lower right' 4'right' 5'center left' 6'center right' 7'lower center' 8'upper center' 9'center' 10 =============== =============