How To Solve Test Cases In Python