I need just to exponentiate the numbers by the last one, for example if I insert 42 the number 4 must be exponentiated by the number 2, if 63 the number 6 by 3 and etc... after that I need to sum all of the results, to do this a tried to separate the values in two different lists but nothing that I do now works properly, please help me find out what do I need to implement or even if I can proceed to get the results I want with my code.
#Get the quantity of terms
n = int(input("Quantity of terms: "))
#List to store the expressions.
lista_n = []
#Loop to add the terms in the list.
for c in range(n):
t = int(input("Terms: "))
lista_n.append(t)
#Separated list of the exponents (the last value of each item).
exponents = [str(item)[-1] for item in lista]
#Separated list of the rest of the numbers.
numbers = [str(item)[:-1] for item in lista]
#Print to see if its all correct (It is until now)
print(exponents)
print(numbers)
