We can use the Python split utility to cut last one element of a string.
Example script is given below.
s="name:test" print (s.split(":")[-1:])
Note that, here ":" is used as the separator. We need to change this according to the required separator.