%s: a placeholder for a string
%s is used as a placeholder for string values you want inject into a formatted string.
%d is used as a placeholder for numeric or decimal values.
name = "QC"
job = "SDE"
info = """
----------- info of %s -------------
name: %s
job: %s
""" % (name, name, job)
print(info)
info2 = """----------- info of {_name}-------------
name: {_name}
job: {_job}
""" .format(_name = name, _job = job)
print(info2)
info3 = """----------- info of {0}-------------
name: {0}
job: {1}
""" .format( name, job)
print(info3)