Skip to content

Instantly share code, notes, and snippets.

@melihme
melihme / gist:6ec023705d0afc213019
Last active June 16, 2022 10:49
Vergi Kimlik No. Doğrulama (Python)
def taxnum_checker(t):
if len(t) != 10:
return False
total = 0
for x in xrange(0, 9):
tmp1 = (int(t[x]) + (9 - x)) % 10
tmp2 = (tmp1 * (2 ** (9 - x))) % 9
if tmp1 != 0 and tmp2 == 0:
tmp2 = 9