I will finish with saying, if you sent (from your python output) standard JSON instead of this made up format, it would have been a simple case of sending the payload through a JSON node.
So while the function above will work - its not ideal (because of the data format)
I you want to do this better, then send JSON out from the python.
e.g. send { "topic" : "pH 99", "payload": 0 }
then send it through a JSON
node - job done, no string splitting.