Added Python 3 support

All is in the title. The use of `.format` is also supported in recent Python 2 implementations.