Python Check If Array Contains Duplicates