def PartitionString(value, separator):
 index = value.find(separator)
 if (index == (-1)):
  return (value, '', value[0:0])
 else:
  return (value[0:index], separator, value[(index + len(separator)):len(value)])

def PartitionString ( value , separator ) : index = value . find ( separator ) if ( index == ( - 1 ) ) : return ( value , '' , value [ 0 : 0 ] ) else : return ( value [ 0 : index ] , separator , value [ ( index + len ( separator ) ) : len ( value ) ] )
equivalent to python2 .