How to decide whether a number in a dictionary is a str or float? : <p>I am asking this because I saw a dictionary produced from two different sources, in which one number is a float, and the same number is a string.</p>

<p>data = {'name': 'jack', 'confidence': '0.95'}</p>

<p>The 'confidence' is a float in once case, and a str in another case. Why is that? </p>

<pre><code>conf = data.get('confidence')
</code></pre>
