는 파이썬의 문자열입니다파이썬 함수 인수 및 문서 혼란
a = "asdf as df adsf as df asdf asd f"
내가 || ""와 ""모두 교체 할 말 있습니다, 그래서 수행
>>> a.replace(" ", "||")
'asdf||as||df||adsf||as||df||asdf||asd||f'
string.replace(s, old, new[, maxreplace])
Return a copy of string s with all occurrences...
나는 다큐를 기반으로 s
을 "생략"할 수 있지만, 나의 혼란은 다음과 the documentation에서 정보입니다 mentement 내가 필요합니다 s
; 단, old
및 new
만 제공합니다. 나는 파이썬 문서가 많이있는 것을 보았다. 나는 무엇을 놓치고 있습니까?
'string '이 아니라'str'입니다. –