Python Pass Variable To Sql If Exists