Learn Python
Strings
3.17
Lesson

Adding a value into the string

We can insert values in a string using the format operator, %.

If the value to be inserted is an integer, then we use %d. For float, we use %g, and for strings, %s.