Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to replace a character in python

my_text = 'Aello world'
my_text = my_text.replace(my_text[0], 'H')
print (my_text)

mytext = 'Hello Zorld'
mytext = mytext.replace('Z', 'W')
print mytext,
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #replace #character #python
ADD COMMENT
Topic
Name
5+2 =