Posts by Rodrigo Matola • 51 points
1 post
-
5
votes3
answers27933
viewsA: Python str.replace() doubt
str.replace(old, new[, max]) old -- substring to be modified new -- the new substring max -- number of times it will be replaced in your case print(texto.replace('caixa1','pacote 2', 1))…