Python Check If String Exist In Array In Sql