The programme to implement scenario where create a file in which we can store the string like"I am happy" and output become a such string with no space "Iamhappy".