On a project I am currently getting returned a list as follows:
[u'40620', u'00700', u'24150', u'11700']
How can I edit the list so it is returned just integer values:
[40620, 00700, 24150, 11700]
Thanks!
Use a list comprehension and int:
>>> lst = [u'40620', u'00700', u'24150', u'11700']
>>> [int(x) for x in lst]
[40620, 700, 24150, 11700]
>>>
00700is not a valid integer value.