The %d
and %s
string formatting "commands" are used to format strings. The %d
is for numbers, and %s
is for strings.
For an example:
print("%s" % "hi")
and
print("%d" % 34.6)
To pass multiple arguments:
print("%s %s %s%d" % ("hi", "there", "user", 123456))
will return hi there user123456