actually i run it as it was python2. your code runs fine on python2.