title: convert python list of bytes to dictionary
body: <p>I am trying to convert a list of bytes to list of dictionary </p>
  
  <pre><code>mylist = [b'Ruby,events_spec.rb,188,5,613\n',
  b'HTML,index.html,14,0,592\n']
  </code></pre>
  
  <p>to something like</p>
  
  <pre><code>[{'Filename':"events_spec.rb","Language":Ruby","Blank Lines":"188","Comment Lines":"5","Code Lines":613},{'Filename':"index.html","Language":HTML","Blank Lines":"14","Comment Lines":"0","Code Lines":592}]
  </code></pre>
  
  <blockquote>
    <p>Even though 'Filename' is second element in the list , I want
    'Filename' to be first element of dictionary</p>
  </blockquote>
  
  <p>Tried something but didn't get desired output</p>
  
  <pre><code>mylist = [b'Ruby,events_spec.rb,188,5,613\n',
  b'HTML,index.html,14,0,592\n']
  
  list1 = ["Filename","Language","Blank Lines","Comment Lines","Code Lines"]
  
  final_list = []
  
  n_dict = {}
  for i in mylist:
      final_list.append(dict(zip(list1,i.decode("ascii").split(","))))
  
  print(final_list)
  </code></pre>
  
  <p>Not Desired Output</p>
  
  <pre><code>[{'Filename': 'Ruby', 'Language': '/Users/hariomsingh/Desktop/ignit/Repo/ignite-chute-analytics-backend/spec/requests/events_spec.rb', 'Blank Lines': '188', 'Comment Lines': '5', 'Code Lines': '613\n'}, {'Filename': 'HTML', 'Language': '/Users/hariomsingh/Desktop/ignit/Repo/ignite-chute-analytics-backend/docs/index.html', 'Blank Lines': '14', 'Comment Lines': '0', 'Code Lines': '592\n'}
  </code></pre>
  
  <p>Tried using OrderedDict</p>
  
  <pre><code>from collections import OrderedDict
  mylist = [b'Ruby,/Users/hariomsingh/Desktop/ignit/Repo/ignite-chute-analytics-backend/spec/requests/events_spec.rb,188,5,613\n',
  b'HTML,/Users/hariomsingh/Desktop/ignit/Repo/ignite-chute-analytics-backend/docs/index.html,14,0,592\n']
  
  
  list1 = ["Filename","Language","Blank Lines","Comment Lines","Code Lines"]
  
  final_list = []
  
  n_dict = OrderedDict()
  for i in mylist:
          final_list.append(dict(zip(list1,i.decode("ascii").split(","))))
  
  print(final_list)
  </code></pre>