How to create tuples from a single list with alpha-numeric chacters?
<p>I have the following list with 2 elements:</p>

<pre><code>['AGCTT 6 6 35 25 10', 'AGGGT 7 7 28 29 2']
</code></pre>

<p>I need to make a list or zip file such that each alphabet corresponds to its number further in the list. For example in list[0] the list/zip should read</p>

<pre><code>{"A":"6", "G":"6", "C":"35","T":"25","T":"10"}
</code></pre>

<p>Can I make a list of such lists/zips that stores the corresponding vales for list[0], list[1],...list[n]?</p>

<p>Note: The alphabets can only be A,G,C or T, and the numbers can take anyvalue</p>

<p>Edit 1: Previously, I thought I could use a dictionary. But several members pointed out that this cannot be done. So I just want to make a list or zip or anything else recommended to pair the Alphabet element to its corresponding number. </p>

<p>Iterate through list > iterate through items (alpha numeric) of the list and construct list of characters and numbers > and then construct list of tuple.</p>

<pre><code>alphanum = ['AGCTT 6 6 35 25 10', 'AGGGT 7 7 28 29 2']
list_of_tuple = []

for s in alphanum:
   ints = []
   chars = []
   for i in s.split():
      if i.isdigit():
         ints.append(i)
      else:
         chars.append(i)

   new_tuple = []
   for (n, item) in enumerate(list(chars[0])):
       new_tuple.append((item, ints[n]))
   list_of_tuple.append(new_tuple)

print list_of_tuple
</code></pre>

python list dictionary zip tuples