Python hanya mengganti contoh pertama

text.replace("text", "new", count)
# count is the number of instances you want to replace
Blushing Beaver