We can eliminate the new line character by using ‘chomp’. It can used in many different scenarios.For example: