# What does %s mean in a python strings? [closed]

I'm not sure what %s means in Python strings. I came across this line of code somewhere a while ago: print("On your journey to %s, you drove at an average speed of %s miles per hour." % (where, speed)) and I just came across a question with the following line: print("The", count, "prime number is %s" %index). And how come neither of the above examples had to use + to combine the strings and integers (presumably) and how come they didn't use str to covert the integers (again presumably...could be floats) to string format?? I am SO confused...

• Welcome to Code Review! Unfortunately this question is off-topic because this site is for reviewing working code. Please take the tour and read up at our help center. When you have working code then feel free to edit the post to include it for a review. Dec 2, 2020 at 23:40
• @SᴀᴍOnᴇᴌᴀ Sorry about that. But thanks for the heads-up. Dec 2, 2020 at 23:42

As already said, this question is off-topic but it's not a stupid question, so don't get discouraged. This question isn't applicable to this platform as it is not an issue you're having with your code. If you could provide your code and then ask what %s means, it would make more sense, as I can see what you are trying to do (and if you're using %s correctly).
But for clarity's sake, %s in Python is really just used for inserting and possibly formatting a string (it saves time with casting and concatenating; two very important terms!).
The following links may provide more helpful and thorough insights into %s: