Python replace()方法
语法:
str.replace(old,new[,max])
作用:
Python replace() 方法把字符串中的 old(旧字符串) 替换成 new(新字符串)。
如果指定第三个参数max,则替换不超过 max 次;如果不指定max,则将第一个参数(old)全部替换为第二个参数(new)。
names = ["Joey Tribbiani", "Monica Geller", "Chandler Bing", "Phoebe Buffay"]
usernames = []
for name in names:
usernames.append(name.lower().