Coding Ninjas Problems Python