rstrip(...)
S.rstrip([chars]) -> string or unicode
Return a copy of the string S with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
If chars is unicode, S will be converted to unicode before stripping
或者一个好的旧regexp:
尝试循环:
输出:
String的
rstrip
函数可以选择获取要删除的字符列表。你知道吗相关问题 更多 >
编程相关推荐