Java Arraylist Set Add Python Code