字母'p'替换为大写字母'P'
有没有整体代码呢
追答C:\Users\spx>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> string = ' python是一种解释型语言 '
>>> string.strip().replace("p","P")
'Python是一种解释型语言'
>>>