Sum of the elements (representing integers) in a list.
For ex. A = ["xx", "3e", "5", "44"]
My function returns 49. So, the RECURSIVE one should do the same.
I implemented the ITERATIVE version successfully.
def add_iter(my_list):
t = 0
for x in my_list:
if x.isdigit() == True:
t+= int(x)
print(t)
I would like to convert it to RECURSIVE function.
acome from, in yourforstatement?add_itera parametermy_list? Inside your function you should work with that, instead of the variable defined outside the function (A)