Python Reverse Words And Swap Cases Hackerrank Solution