Write A Function With Collections Python