for i in range(len(list_str1)):
    for j in range(len(list_str2)):
        if i != j and strcmp(c_arr1[i], c_arr2[j]) == 0:
            print(i, j, list_str1[i])
free(c_arr1)
free(c_arr2)
foo(['hello', 'python', 'world'], ['python', 'rules'])
Fast string array - Cython