Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #5
- def nifsValidos(dicio):
- lista_chaves=[]
- for chave in dicio.keys():
- lista_chaves+=[str(chave)]
- for chave in lista_chaves:
- soma=0
- for i in range(9,0,-1):
- soma+=i*int(chave[9-i])
- if soma%11!=0:
- chave=int(chave)
- del dicio[chave]
- return dicio
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement