python-3.x

Luhn algorithm id number

I’m using the Luhn algorithm to find ids check number.
for Example – input – 12345678 , output – 2.
I’m trying to do it in the most efficient way possible, as well as in the fewest lines possible.
So far I wrote this :
ID = input("Ent…