How to use partition in Scala?
'Partition' in Scala is a method used to split a collection a List or a tuple into separate collections, lists, or tuples based on a predicate function/method. In the Output, we get two collections, lists, or tuples. The first one contains the elements that satisfy or align with the predicate method