How get value list by another list

how get list out ={2, 1, 2, 1} with use nodes or python?

thank you for example)
i am find this way: