# Remove elements with matching string values in tuple

**URL:** <https://discourse.julialang.org/t/remove-elements-with-matching-string-values-in-tuple/54065>\
**Category:** General Usage\
**Created:** [January 27, 2021, 4:49pm UTC](https://discourse.julialang.org/t/remove-elements-with-matching-string-values-in-tuple/54065 "2021-01-27T16:49:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorb24](https://avatars.discourse-cdn.com/v4/letter/l/ecae2f/32.png) [@lorb24](https://discourse.julialang.org/u/lorb24)\
**Post date:** [January 27, 2021, 4:49pm UTC](https://discourse.julialang.org/t/remove-elements-with-matching-string-values-in-tuple/54065/1 "2021-01-27T16:49:16Z")

</div>

I have a list called `list1`:

```julia
[a,b,c]

```

And use the function

```julia
function combos(list1,list2)
    combolist=vec(collect(Base.product(list1,list2)))
    return combolist
end

```

And my results look something like below:

```julia
(a,a)
(a,b)
(b,b)
(b,c)
(c,c)

```

Is there a way to remove `(a,a), (b,b), (c,c)`?

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [January 27, 2021, 5:00pm UTC](https://discourse.julialang.org/t/remove-elements-with-matching-string-values-in-tuple/54065/2 "2021-01-27T17:00:09Z")

</div>

Do you know the Combinatorics package?

```julia
julia> using Combinatorics
julia> a = ["a","b","c"]
julia> Tuple.(collect(combinations(a,2)))
3-element Array{Tuple{String,String},1}:
 ("a", "b")
 ("a", "c")
 ("b", "c")

```

But as your example isn’t complete, this is perhaps not what you want.
