I have 2 arrays and I need to switch the last digit of the integers in one array with the integers in another. Its better if I show you the output to get a better understanding of what I'm trying to do. I'm not sure this is even possible to do at the least.
Output of arrays:
first_array=['3', '4', '5', '2', '0', '0', '1', '7']
second_array=['527', '61', '397', '100', '97', '18', '45', '1']
What it then look like:
first_array=['3', '4', '5', '2', '0', '0', '1', '7']
second_array =['523', '64', '395', '102', '90', '10', '41', '7']
>>> [s[:-1]+f for (f,s) in zip(first_array, second_array)]
['523', '64', '395', '102', '90', '10', '41', '7']