title: What is an elegant way to convert a python dictionary into a comma separated keys string and a comma separated values string?
body: <p>I have a dictionary as follows:-</p>
  
  <pre><code>dict={'a':'1','b':'2', 'c':'3'}
  </code></pre>
  
  <p>To convert it into into a comma separated keys string <code>key_string</code> and a comma separated values string <code>val_string</code> I do the following:-</p>
  
  <pre><code>key_list=[]
  val_list=[]
  
   for key,value in dict.iteritems():
       key_list.append(key)
       val_list.append(value)
  
   key_string = ','.join(key_list)
   val_string = ','.join(val_list)
  </code></pre>
  
  <p>The result is</p>
  
  <pre><code> key_string = "a,b,c"
   val_string = "1,2,3" 
  </code></pre>
  
  <p>Is there a more efficient/elegant way to do this?</p>