strip()
函数:返回去除字符串两端空格的版本。例如:
string=" Hello, World! "print("Stripped String:", string.strip())
输出:
Stripped String: Hello, World!
strip()
函数:返回去除字符串两端空格的版本。例如:
string=" Hello, World! "print("Stripped String:", string.strip())
输出:
Stripped String: Hello, World!