long_str = " Coding is hard, yet fun!\t" r_str = long_str.rstrip() print(len(long_str)) print(len(r_str)) # Output 29 28