How to pick one number of an Integer
<p>How can I pick one of the digits from an Integer like: 97723
and choose (for example) the number 2 from that number and check if its an odd or an even number?</p>

<p>Also, can I print only the odd numbers from an Integer directly? (Is there any default function for that already?)</p>

<p>Thanks in advance</p>

<pre><code>even = lambda integer: int("".join([num for num in str(integer) if int(num) % 2 == 0]))
</code></pre>

<p>or</p>

<pre><code>def even(integer):
    result = ""
    integer = str(integer)
    for num in integer:
        if int(num) % 2 == 0:
            result += num
    result = int(result)
    return(result)
</code></pre>

python python-3.x