The difference between python 2.x and 3.x is very big, but your script will run without modification, since it's very simple. They're more like two similar languages. Also, in 3.x you should write print('foo'), not print 'foo', and consider reading PEP 8.