Python 2.7 supports string.format and Python 3 supports % formatting.
The only actual difference in that example is that print became a function in Python 3, requiring some additional parentheses. (Something that can be mechanically translated without much hassle.)
print "%s remember to %s in %s if %s but never %s" % (some_random_tuple)
vs
print("{when} remember {what} in {room} if {condition} but never {dont}".format(* * dict_with_explicit_keys))
A bit verbose but much clearer and future-proof.