We need to manipulate an entire element of a list, suppose that in this list it is like this:
List = [123432, 2345321, 234554]
I want to get a new number of the centers of each item from the list I mean that if the number has 5 digits, take the digits from 2 to 4, if it is 7, take the digits from 3 to 5
newList = [234, 453, 345] - the number of digits to take depends on a valiable "k" entered by the user
My only doubt is how I can access half of the integers in the list, it just occurs to me to make a new list for each element, split and manipulate the digits as elements of a litsa, but I still have the doubt if it is a correct way to do it and above all I still have the doubt of how to get those elements in between.