Powershell While Loop Array Javascript Duplicates In Python