title: Julia programming - creating a tuple from indices in a set
body: <p>I have a set S={1,2,3}. I'm trying to create a tuple of the form (i,j,1) for which i and j are elements of S. When  S={1,2,3}, my set of tuples (say E)should be {(1,2,1),(2,1,1),(1,3,1),(3,1,1),(3,2,1),(2,3,1)}. I tried in the following way. </p>
  
  <pre><code>    for i in S
        for j in S
          E = Set()
          E = [(i,j,1),(j,i,1), i!=j]
          print(E)
        end
      end
  </code></pre>
  
  <p>But it doesn't give me the required result.What I'm getting is </p>
  
  <blockquote>
    <p>Any[(2,2,1),(2,2,1),false]Any[(2,3,1),(3,2,1),true]Any[(2,1,1),(1,2,1),true]Any[(3,2,1),(2,3,1),true]Any[(3,3,1),(3,3,1),false]Any[(3,1,1),(1,3,1),true]Any[(1,2,1),(2,1,1),true]Any[(1,3,1),(3,1,1),true]Any[(1,1,1),(1,1,1),false]</p>
  </blockquote>
  
  <p>Can someone please help me to get the required result? </p>