طريقة replace

replace(self, old_value, new_value)

استبدال النص.


def replace(self, old_value, new_value):
    ...
معامليكتبوصف
old_valuestrالنص القديم.
new_valuestrالنص الجديد.

replace(self, index, count, text)

استبدال النص.


def replace(self, index, count, text):
    ...
معامليكتبوصف
indexintمؤشر البداية.
countintعدد الأحرف.
textstrالنص.

أنظر أيضا