Quote Originally Posted by andrew1992 View Post
Actually those don't need to be used anymore - I find this much easier:

print "Hello, {0}! I'm {1} years old".format("John", 18)

Hello, John! I'm 18 years old.
This was introduced in Python 2.6 and is the only legal way in Python 3.0, which dropped the (weird) way using the % operator. Keep that in mind for the future.