I have the following variables:
total_list: [ node1, node2, node5 ]
desired_cluster_size: 2
I need to keep the nth first elements in total_list based on the integer in variable desired_cluster_size. My exepected result is:
desired_list : [ node1, node2 ]
I have no idea where to start to fulfill this requirement.