lst = [[170,True],[210,False],[410,True],[170,True]...]
From this list I need extract into.
sublist1 = [170,210,410,170,..]
sublist2 = [True, False, True, True..]
How can I obtain this?
You may simply use :
sublist1, sublist2 = zip(*lst)
Apart from zip(*)
(which returns tuples) you can also use two list comprehensions:
sublist1 = [i[0] for i in lst]
sublist2 = [i[1] for i in lst]
You can use map()
function like this:
lst = [[170,True],[210,False],[410,True],[170,True]]
sublist1 = map(lambda n: n[0], lst)
sublist2 = map(lambda n: n[1], lst)