okay here is the example:
data = ['This', 'is', 'a', 'test', 'of', 'the', 'list']
replaceText = 'test'
replaceData =['new', 'test']
i did data.replace(replaceText, replaceData) but it doesn't work. How to replace a string in a list of string with a list of strings? Any help will be appreciated.
Edit: The exact condition is to replace or split the words that contain "s" so I put a loop in it. So the end result will print data = ['Thi', 'i', 'a', 'te','t', 'of', 'the', 'li','t']