long_str = " Coding is hard, yet fun!\t" s_str = long_str.strip() print(len(long_str)) print(len(s_str)) # Output 29 24