各位朋友 如何用python语言表达

个位数为 6 且能被 3 整除的五位数共有多少个

q=0
for i in range(10000,100000):
if str(i)[-1]=='6' and i%3==0:
q+=1
print(q)