.replace Function in Python | Python String - replace ( ) method | replace a letter in python

preview_player
Показать описание
This video provides a detailed explination on how to replace substring in a string by using new string in python in telugu.
Quick video on how you could find and replace a word in a python program.

Nodes:
'''
Replace a string with another string:

replace
syntax:

i/p: Hello hero
o/p: Hello BTECH Spark

i/p: string :Python is hard
oldsubstring = hard
new substring = easy
o/p: Python is easy

i/p : string : abababab
old string : a
new string : b
o/p: bbbbbbbb
'''
s = input("Enter string: ")
old_string = input("Enter old substring:")
new_string = input("Enter new substring:")

THANKS FOR WATCHING OUR VIDEOS
PLEASE LIKE,SHARE,and SUBSCRIBE and hit the bell icon.
Any querries comment your querry i try to rectify your doubt.
Рекомендации по теме
visit shbcf.ru