The file attached has a series of "+" and "-" characters, representing additions and subtractions. Create a function named convert_operator, which consumes a string (a single character, either a "+" or a "-") and returns either 1 or -1, respectively. Then apply this function to the contents of the file to calculate the sum of all these pluses and minuses (so an integer number). Print that sum. Notice that the "plus and minus.txt" file is entirely on one line. Therefore, you should use the read method to access its contents. But you should only pass one character at a time to the function you write!

The file is in plus and minus.txt and in the plus and minus.txt tab of the sandbox (To sandbox).

The first lines of plus and minus.txt:

---++---+-+++--+---+-+++--+-++--+--+++--+-+++++--+-----+++--
...