Hi!
So I have a string that I want to split but I need to keep the exact part that I'm splitting
for example
Result wanted:
['THIS']
Thanks in advance!
So I have a string that I want to split but I need to keep the exact part that I'm splitting
for example
Code:
s_words = 'i need toKeepTHISword'
splitWord = s_words.split('THIS')
# Result: ['i need toKeep', 'word']
Result wanted:
['THIS']
Thanks in advance!
Comment