<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_string(self, string):
 """Set the working string and its length then reset positions."""

        self.string = string
        self.length = len(string)
        self.reset_position()