I run this code in Python, but I don’t know why I got the error Type Error: String_Editing() takes no arguments. Can anyone help me?
class String_Editting():
def int(self,total_str,old_substr,new_sunstr):
self.total_str_=total_str
self.old_sunstr_=old_sunstr
self.new_substr_=new_sunstr
self.new_str=total_str
result=self.find()
if result==false:
print(‘your substr is not is total str’)
else:
self.new_str=self.replace(result[0],result[1])
def find(self):
i=0
j=0
start=0
end=0
while i<len(self.total_str_):
if self.total_str_[i]==self.old_sunstr_[j]:
i+=1
if j==0:
start=i
if j==len(self.old_sunstr_):
end=i
return star,end
j+=1
else:
i+=1
j+=0
return false
def replace(self,start,end):
return self.total_str_[:start]+self.new_substr_+self.total_str_[end+1:]
def get(self):
return self.new_str
obj=String_Editting(‘I am mahsa’,‘mahsa’,‘hesami’)
print(obj.get())