def sanitize_to_wdq_result(data):
    """Format data to match WDQ output.

    @param data: data to sanitize
    @type data: list of str
    @return: sanitized data
    @rtype: list of int
    """
    for i, d in enumerate(data):
        # strip out http://www.wikidata.org/entity/
        data[i] = int(d.lstrip('Q'))
    return data