How to determine wrong data type
<p>I use the following to see if the data is an integer, if not it tells me. Is there a way to determine which one is incorrect so can change it or would i have to create the same loop for every item?</p>

<pre><code>while i_input == True:
    try:
        i_pointstarget=int(pointstarget.get())
        i_ap1=int(ap1.get())
        i_ap2=int(ap2.get())
        i_ap3=int(ap3.get())
        i_ap4=int(ap4.get())
        i_ap5=int(ap5.get())
        i_ap6=int(ap6.get())
    except ValueError:
        i_input=False
        continue
    else:
        break
</code></pre>

<p>Thanks for any help :)</p>

<p>To know the type of a variable you can use <code>isinstance(variable_name, int)</code>, this will return the Boolean value.</p>

python