title: Python: return float 1.0 as int 1 but float 1.5 as float 1.5
body: <p>In Python is there a way to turn <code>1.0</code> into a integer <code>1</code> while the same function ignores <code>1.5</code> and leaves it as a <code>float</code>?</p>
  
  <p>Right now, <code>int()</code> will turn <code>1.0</code> into <code>1</code> but it will also round <code>1.5</code> down to <code>1</code>, which is not what I want.</p>