The code is as follows ( Example ):
name = "panpan"
print(" My name is %s" % name)
Output results :
The code is as follows ( Example ):
name = "panpan"
print(" My name is {}".format(name))
Output results :
Formatting method :
1、“%s” % Variable
2、“{
}”.format( Variable )