擅长:python、mysql、java
<p>这是因为<code>"7"</code>是您迭代的最后一个数字,即<code>'0123456789'</code>。如果您需要进一步的指导,请查看<a href="http://pythontutor.com/visualize.html#code=number%20%3D%20%229,223,372,036,854,775,807%22%0AcleanedNumber%20%3D%20''%0A%0Afor%20i%20in%20range%280,%20len%28number%29%29%3A%0A%20%20%20%20if%20number%5Bi%5D%20in%20'0123456789'%3A%0A%20%20%20%20%20%20%20%20cleanedNumber%20%3D%20number%5Bi%5D%0A%0AnewNumber%20%3D%20int%28cleanedNumber%29%0A%0Aprint%28%22The%20number%20is%20%7B%7D%20%22.format%28newNumber%29%29%20%20%20%20&cumulative=false&curInstr=70&heapPrimitives=false&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false/" rel="nofollow noreferrer">this</a>:</p>