title: How to print a graf in the way I need to
body: <p>I have to print the dictionary(adjacency list): </p>
  
  <pre><code>{'ACATG':{'CATGA', 'CATGT'}, 'TGATT':{'GATTA'}, 'GGGAT':{'GGATC', 
  'GGATA'}}
  </code></pre>
  
  <p>this way:</p>
  
  <pre><code>ACATG -&gt; CATGA, CATGT
  TGATT -&gt; GATTA
  GGGAT -&gt; GGATC, GGATA
  </code></pre>
  
  <p>and store this into a .txt file.</p>
  
  <p>I tried printing this way:</p>
  
  <pre><code>di = {'ACATG':{'CATGA', 'CATGT'}, 'TGATT':{'GATTA'}, 'GGGAT':{'GGATC', 
  'GGATA'}}
  for v,u in di.items():
    print(v+' -&gt; ', end="")
    li = []
    for g in u:
      li.append(g)
      print(g,end='')
      print(',',end='')
    print('')
  </code></pre>
  
  <p>But there is an extra comma at the end of each set:</p>
  
  <pre><code>ACATG -&gt; CATGA,CATGT,
  TGATT -&gt; GATTA,
  GGGAT -&gt; GGATC,GGATA,
  </code></pre>
  
  <p>And the code is just too long and not pythonic. I would also like to 
   store the printed output into a file</p>