difference between python2 and python3 - int() and input()
<p>I wrote below python code.
And I found that python2 and python3 has totally difference running result for input of 1.1.
Why is there such difference between python2 and python3? 
For me, int(1.1) should be 1, then position is valid index 1 within range 0,1,2. So  can you please explain why python3 has such result?</p>

<pre><code>s=[1,2,3]
while True:
  value=input()
  print('value:',value)
  try:
    position=int(value)
    print('position',position)
    print('result',s[position])
  except IndexError as err:
    print('out of index')
  except Exception as other:
    print('sth else broke',other)


$ python temp.py
1.1
('value:', 1.1)
('position', 1)
('result', 2)


$ python3 temp.py
1.1
value: 1.1
sth else broke invalid literal for int() with base 10: '1.1'
</code></pre>