title: How do I make this list of lists into a list of tuples?
body: <p>I'm having a bit of trouble with making this list of lists </p>
  
  <p><code>triangles= [[0, 30, 31], [2, 32, 38], [3, 24, 46], [4, 14, 27], [10, 18, 48], [12, 21, 35], [15, 39, 45], [17, 32, 38], [19, 32, 38], [21, 43, 44], [29, 43, 44]]</code> </p>
  
  <p>into a list like this:</p>
  
  <pre><code>[(0,30),(30,31),(0,31),(2,32),(32,38),(2,38).. etc]
  </code></pre>
  
  <p>I have already tried this:</p>
  
  <pre><code>c_list=list(nx.clique.enumerate_all_cliques(G))
  triangles=[x for x in c_list if len(x)==3]
  for [u,v,w] in triangles:
      print((u,v),(v,w),(u,w))
  </code></pre>
  
  <p>since 'triangles' is a list of nodes that make triangles in a graph and I need the edges so that I can graph the triangles. However, I can't use this code because it doesn't have a type. So how do I turn it into a list of tuples?</p>