You are doing substitution incorrectly,
# You have to put the type after the % a = 'string' print("%s aaaa" % a) b = 123.1423 print("%.2f bbbb" % b)
It's as easy as that. You have to tell python why type of information you are passing it with substitution.
You just need to put the "%" in front of the "s"