def _sanitize_float_str(str):
    """Sanitize and convert QBasic string floats.

    QBasic string representations of doubles have # appended,
    or sometimes a D instead of an E in x.xxxE+k form.
    """
    return float(str.replace('#', '').replace('D', 'E'))