Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

replace a string in a list

list = ['helloXXX', 'welcomeXXX', 'to999', 'SofthuntUUU']
replace = [list.replace('XXX', 'ZZZ') for list in list]
print(replace)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #replace #string #list
ADD COMMENT
Topic
Name
4+5 =