Capgemini Engineering interview question

Reserved string in python without using any predefined method