def _read_charval_file(handle):
    """Read sequence character frequencies/weights from file.

    Args:
        handle (file/list): input file

    Returns:
        dict : e.g. {'A': 0.0826, 'Q': 0.0393}

    Sample input format:
        # Multi-line information
        # e.g. Frequencies obtained from SwissProt.
        A   0.0826
        Q   0.0393
        L   0.0965
        S   0.0659
        R   0.0553
        E   0.0674
        K   0.0583
        T   0.0534
        ...
    """
    d = {}
    for line in handle:
        if line.strip() and not line.startswith('#'):
            sl = line.split()
            char = sl[0]
            val = float(sl[1].strip())
            d[char] = val
    return d