If you look closely at the help of the strip function, He says this:
Help on built-in function strip: strip(...) S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping
It will remove all leading and trailing characters and spaces. In your case, character sets
s, e, r, v, i, c, C, h, k and _
You can get a postmaster with something like this
a = "serviceCheck_postmaster" print a.split("_")[1]
kvivek
source share