How to check last digit of number
<p>Is there a way to get the last digit of a number. I am trying to find variables that end with "1" like 1,11,21,31,41,etc..</p>

<p>If I use a text variable I can simply put </p>

<pre><code>print number[:-1] 
</code></pre>

<p>but it works for variables with text(like "hello) but not with numbers.  With numbers I get this error:</p>

<pre><code>TypeError: 'int' object is not subscriptable
</code></pre>

<p>I am trying to see if there's a better way to deal with numbers this way.  I know a solution is to convert to a string and then do the above command but I'm trying to see if there's another way I have missed.</p>

<p>Thanks so much in advance...</p>
