# How to convert unicode to list

**URL:** <https://forum.inductiveautomation.com/t/how-to-convert-unicode-to-list/41606>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 17, 2020, 10:40am UTC](https://forum.inductiveautomation.com/t/how-to-convert-unicode-to-list/41606 "2020-12-17T10:40:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav.Shitole](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gaurav.shitole/32/72050_2.png) [@Gaurav.Shitole](https://forum.inductiveautomation.com/u/Gaurav.Shitole)\
**Post date:** [December 17, 2020, 10:40am UTC](https://forum.inductiveautomation.com/t/how-to-convert-unicode-to-list/41606/1 "2020-12-17T10:40:55Z")

</div>

Hi there,

I am facing a strange issue while showing data into a table. See the below table in Column name “ **Content** ” I have list of rows,

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/885a811b5ac7c060f47fd54bcc10929b226d9d30.png)

Its going to be huge data in bulk which will be shown here. In short when I press a button with following script

```auto
newRow1 = [[1001, 'Tank 1'], [1002, 'Tank 2']]
event.source.parent.getComponent('Seq_Table').data = system.dataset.toDataSet(["Tank IDs","Tank Names"],newRow1)

```

It works as also the type of newRow1 here is a list. However when I pull the data to add into newRow like below:

```auto
Data = system.tag.read("[ProjectName]Global/TankQueued").value #This is same databse linked to the table showen in above pic
pyData = system.dataset.toPyDataSet(Data)
for row in pyData:
	newRow1 = row[1]
	 
print "Value of newRow1",newRow1 #Output is [[109, u'Tank 9'], [110, u'Tank 10']]
print "Type of New Row 1 is:",type(newRow1) #Output is : <type 'unicode'>

```

I am not sure why it converts into Unicode. And I did try casting it to List but it didn’t work. My further logic is based on this. Please suggest.

1. Is it possible to convert that unicode into list
2. What other way i can achieve this?

below screenshot is just for information:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/48098cea5c621175d17dec5341e1bcbc174f9b96.png)

Ignition version: 8.1  
Windows: 10 Pro

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 17, 2020, 1:59pm UTC](https://forum.inductiveautomation.com/t/how-to-convert-unicode-to-list/41606/2 "2020-12-17T13:59:11Z")

</div>

_ast.literal\_eval()_ can help with that:

```python
import ast

testList = "[[1001, 'Tank 1'], [1002, 'Tank 2']]"
print ast.literal_eval(testList)

```
