Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# https://pt.stackoverflow.com/a/221133/7412

def impares(l, i=0, lst_impares=[]):
    try:
        e = l[i] if l[i]%2!=0 else None
        i+=1
        if e:
            lst_impares.append(e)
        return impares(l,i,lst_impares) 
    except:
        return lst_impares

print(impares([1,2,3,4,5,19,10]))