I have a task to print the below mentioned lines from a python script and the script must pass all the test cases. The problem is that some trailing character are appearing