8 added 102 characters in body
source | link

Python 2, 4851 bytes

Takes stringinteger as input. +4 bytes to handle all same digits

Try it onlineTry it online

lambda S:[x==S[[x==`S`[-1]for x in S[in`S`[::-1]+'~'].index(0)

5348 bytes for integerstring as input. Try it online

N=input()
c,e=N%10,0
whilelambda N%10==eS:N/=10;c+=1
print[x==S[-1]for cx in S[::-1]+'~'].index(0)

Python 2, 48 bytes

Takes string as input. +4 bytes to handle all same digits

Try it online

lambda S:[x==S[-1]for x in S[::-1]+'~'].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c

Python 2, 51 bytes

Takes integer as input. Try it online

lambda S:[x==`S`[-1]for x in`S`[::-1]+'~'].index(0)

48 bytes for string as input. Try it online

lambda S:[x==S[-1]for x in S[::-1]+'~'].index(0)
7 added 167 characters in body
source | link

Python 2, 48 bytes

Takes string as input. +4 bytes to handle all same digits

Try it online

lambda S:[x==S[-1]for x in S[::-1]+'0']1]+'~'].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c

Python 2, 48 bytes

Takes string as input. +4 bytes to handle all same digits

lambda S:[x==S[-1]for x in S[::-1]+'0'].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c

Python 2, 48 bytes

Takes string as input. +4 bytes to handle all same digits

Try it online

lambda S:[x==S[-1]for x in S[::-1]+'~'].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c
6 deleted 88 characters in body
source | link

Python 2, 48 bytes

Takes string as input

lambda S:map(lambda x:x==S[-1],S[::-1]).index(0)

Version #2,. +4 bytes to handle all same length:digits

lambda S:[x==S[-1]or 0for1]for x in S[::-1]]1]+'0'].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c

Python 2, 48 bytes

Takes string as input

lambda S:map(lambda x:x==S[-1],S[::-1]).index(0)

Version #2, same length:

lambda S:[x==S[-1]or 0for x in S[::-1]].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c

Python 2, 48 bytes

Takes string as input. +4 bytes to handle all same digits

lambda S:[x==S[-1]for x in S[::-1]+'0'].index(0)

53 bytes for integer as input

N=input()
c,e=N%10,0
while N%10==e:N/=10;c+=1
print c
5 added 84 characters in body
source | link
4 added 109 characters in body
source | link
3 deleted 147 characters in body
source | link
2 added 186 characters in body
source | link
1
source | link