I have a list as:
mylist = [['469536.18999', '6334694.44001', '-9999.0'], '-9999.0', '-9999.0', '-9999.0', '-9999.0']
i wish to unlist as:
['469536.18999', '6334694.44001', '-9999.0', '-9999.0', '-9999.0', '-9999.0', '-9999.0']
i used different approaches but always i got the wrong result:
from itertools import chain
print list(chain.from_iterable(mylist))
['469536.18999', '6334694.44001', '-9999.0', '-', '9', '9', '9', '9', '.', '0', '-', '9', '9', '9', '9', '.', '0', '-', '9', '9', '9', '9', '.', '0', '-', '9', '9', '9', '9', '.', '0']
sum(mylist, [])
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: can only concatenate list (not "str") to list