Thanks.
The code above didn't quite work (something about not being iterable) but managed to get the function working with the ff:
Code:
# sort John/Jane to Jane/John
separator = '/'
tmplist = []
for list1 in val:
res = [l.strip() for l in list1.split(separator)]
tmplist.append( separator.join(sorted(res)) )
val = tmplist