>>> str = 'I am a student, I have learnt python for three years'
'I am a student, I have learnt python for three years'
>>> split_str = str.split('python')
>>> new_str = ""
>>> for line in split_str:
... new_str += line
>>> print(new_str)
I am a student, I have learnt for three years
>>> str = 'I am a student, I have learnt python for three years'
'I am a student, I have learnt python for three years'
>>> split_str = str.split('python')
>>> new_str = "".join(split_str)
>>> print(new_str)