def convert_string_to_pymath(strin):
    """ Convert a string to a 'math' format """

    if strin.strip() is not '':
        return '$' + strin.replace(' ', '\ ') + '$'
    else:
        return strin