a = 'sdSdsfdAdsdsdfsfdsdASDSDFDSFa' #字符串a大小写互换 s = a.swapcase() print('s大小写互换后为:',s) s.replace('A','Z') s.replace('b','y') print(s)