Friday, 6 September 2013

Back-convert a list (formatted as a string) into a list

Back-convert a list (formatted as a string) into a list

I have a list of dictionaries, it looks something like this:
[{'T': 13472}, {'A': 13472}, {'C': 9866, 'T': 3606}, {'G': 13472}, {'G':
13472}, {'A': 221, 'C': 26, 'T': 12845, 'G': 380}, {'T': 13472}, {'A':
13472}, {'C': 546, 'T': 12926}, {'C': 13472}, {'A': 13472}, {'C': 10674,
'T': 2798}, {'C': 13472}, {'A': 13472}, {'C': 554, 'T': 12918}, {'C':
13472}, {'A': 13472}]
The issue is right now, it's formatted as a string. In other words, when I
try to iterate through the items in the list, I get only individual
characters. Is there a way to convert it back into a "list of
dictionaries" type?

No comments:

Post a Comment