现成的函数,怎么用?
上一节
下一节
1. 内置函数
help(str) :学习 str( )函数的用法
2. str下的函数replace
help(str.replace)
显示:
Help on method_descriptor:
replace(self, old, new, count=-1, /)
Return a copy with all occurrences of substring old replaced by new.
count
Maximum number of occurrences to replace.
-1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.

