#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 Martine Lenders <mail@martine-lenders.eu>
#
# Distributed under terms of the MIT license.

print("%s" % "test")
print("%02d" % 2)
print("%.4f" % 2.0)


#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 Martine Lenders <mail@martine-lenders.eu>
#
# Distributed under terms of the MIT license.

print("{:s}".format("test"))
print("{:02d}".format(2))
print("{:.4f}".format(2.0))


Use new formatting in test.py