def index_containing_substring(vars_list, var):
    """
    Return the index of the first string in vars_list that contains the substring var

    :param vars_list: list of string.
    :param var: string.
    :return: integer.
    """
    for i, s in enumerate(vars_list):
        if var in s:
              return i
    return -1