結果 : cursor is not defined error in python