>>621 なんか時間がかかりそうだな。
こっちの方がマシだろ。

a=9876543210
n=5
print(a//10**n%10)
# 5