Hi everyone I have a simple problem but I don't find the solution, I have a function that returns something like that
[[4, 'adr', 0, 0, 1, '2016-04-05T13:00:01'], [115, 'adr', 0, 0, 1, '2016-04-05T14:00:01'], [226, 'adr', 0, 0, 1, '2016-04-05T15:00:01'], [337, 'adr', 0, 0, 1, '2016-04-05T16:00:01']]
when I check de type of this variable type(data)
say that is a string <type 'str'>
I want to create a loop to get each element like this
item 1 [4, 'adr', 0, 0, 1, '2016-04-05T13:00:01']
item 2 [115, 'adr', 0, 0, 1, '2016-04-05T14:00:01']
I try to convert the string in a list, a tuple... but nothing work, any idea how to change the string to any type that I can do a loop and get the items
when I try to convert in a tuple or string I have this result
('[', '[', '4', ',', ' ', "'", 'a', 'd', 'r', "'", ',', ' ', '0', ',', ' ', '0', ',', ' ', '1', ',', ' ', "'", '2', '0', '1', '6', '-', '0', '4', '-', '0', '5', 'T', '1', '3', ':', '0', '0', ':', '0', '1', "'", ']', ',', ' ', '[', '1', '1', '5', ',', ' ', "'", 'a', 'd', 'r', "'", ',', ' ', '0', ',', ' ', '0', ',', ' ', '1', ',', ' ', "'", '2', '0', '1', '6', '-', '0', '4', '-', '0', '5', 'T', '1', '4', ':', '0', '0', ':', '0', '1', "'", ']', ',', ' ', '[', '2', '2', '6', ',', ' ', "'", 'a', 'd', 'r', "'", ',', ' ', '0', ',', ' ', '0', ',', ' ', '1', ',', ' ', "'", '2', '0', '1', '6', '-', '0', '4', '-', '0', '5', 'T', '1', '5', ':', '0', '0', ':', '0', '1', "'", ']', ',', ' ', '[', '3', '3', '7', ',', ' ', "'", 'a', 'd', 'r', "'", ',', ' ', '0', ',', ' ', '0', ',', ' ', '1', ',', ' ', "'", '2', '0', '1', '6', '-', '0', '4', '-', '0', '5', 'T', '1', '6', ':', '0', '0', ':', '0', '1', "'", ']', ']')