已知字符串str=' aa bb ccdd ee ',怎么使用split()和join()函数删除字符串中多余的空格,如果有多个连续的空格,只保留一个
str=' aa bb cc \ndd ee ' str=' '.join(str.split()) print(str)