Python Insert Array Into Sql Query To Join