For example: list1 = [1t, 1r, 2t, 2r, 3t, 3r...., nt, nr]
. How do I make a list list_t
that has all t
items from list1
? I tried using the following for loop:
for i in list1[0:]:
list_t =[i.t]
But this only assigns the first item to list_t
.