replace format string that requires python 2.7+