Python Subset Function Examples In Java