Help on built-in function replace:
replace(...)
S.replace(old, new[, count]) -> string
Return a copy of string S with all occurrences of substring
old replaced by new. If the optional argument count is
given, only the first count occurrences are replaced.
a = a.replace("<","_")
a = a.replace(">","_")
print a
_SPK/_一年**九店_NPS/_**_NON/_
2 split用法
help(a.split)
Help on built-in function split:
split(...)
S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in the string S, using sep as the
delimiter string. If maxsplit is given, at most maxsplit
splits are done. If sep is not specified or is None, any
whitespace string is a separator and empty strings are removed
from the result.
a = "<SPK/>一年**九店<NPS/>**<NON/>"help(a.replace)Help on built-in function replace:replace(...) S.replace(old, new[, count]) -> string Return a copy of string S with all occurrences of substring