title: I have a function that returns a list and I dont know how to reuse this list for compare it to another one
body: <pre><code>def show(x):
      ligne0 = &quot;╔═══╤═══╤═══╦═══╤═══╤═══╦═══╤═══╤═══╗&quot;
      ligne1 = &quot;║ . │ . │ . ║ . │ . │ . ║ . │ . │ . ║&quot;
      ligne2 = &quot;╟───┼───┼───╫───┼───┼───╫───┼───┼───╢&quot;
      ligne3 = &quot;╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣&quot;
      ligne4 = &quot;╚═══╧═══╧═══╩═══╧═══╧═══╩═══╧═══╧═══╝&quot;
  
      valeurs = [[&quot;&quot;]+[&quot; 1234567890&quot;[case] for case in ligne] for ligne in x]
  
      print(ligne0)
      for ligne in range(1,9+1):
          print(&quot;&quot;.join(n+s for (n, s) in zip(valeurs[ligne-1], ligne1.split(&quot;.&quot;))))
          print([ligne2, ligne3, ligne4][(ligne % 9 == 0) + (ligne % 3 == 0)])
  
  def ligne(x, i):
      for ligne in x:
          return x[i-1]
  
  grid_test = [
      [6, 2, 5, 8, 4, 3, 7, 9, 0],
      [0, 9, 1, 2, 6, 5, 4, 8, 3],
      [4, 0, 3, 9, 7, 1, 6, 2, 5],
      [8, 1, 0, 5, 9, 7, 2, 3, 6],
      [2, 3, 6, 0, 8, 4, 9, 5, 7],
      [9, 5, 7, 3, 0, 6, 8, 1, 4],
      [5, 6, 9, 4, 3, 2, 1, 7, 8],
      [3, 4, 2, 7, 1, 8, 5, 6, 9],
      [1, 7, 8, 6, 5, 9, 3, 4, 2],
  ]
  
  valeur_p = [1, 2, 3, 4, 5, 6, 7, 8, 9]
  show(grid_test)
  print(ligne(grid_test, 1))
  </code></pre>
  <p>So I have the function ligne that return me a line i from a grid x and I dont know how to compare the elements in this list with another list</p>